155 lines
3.4 KiB
PHP
155 lines
3.4 KiB
PHP
/*
|
|
* _ _
|
|
* __ _ _ __ ___ _ _ _ __ __| || |__ __ _ ___ ___
|
|
* / _` || '__|/ _ \ | | | || '_ \ / _` || '_ \ / _` |/ __| / _ \
|
|
* | (_| || | | (_) || |_| || | | || (_| || |_) || (_| |\__ \| __/
|
|
* \__, ||_| \___/ \__,_||_| |_| \__,_||_.__/ \__,_||___/ \___|
|
|
* |___/
|
|
*
|
|
* nouveau debut fevrier 2025 - we love raytracing
|
|
*
|
|
* une cabane pour faire riche.
|
|
* une seule forme de cabane pour le moment
|
|
*/
|
|
#declare Base_cabane_forme = object
|
|
{
|
|
difference {
|
|
#local Hc = 0.90;
|
|
box { <-0.90, 0, 0>, <0.90, Hc, 0.80> }
|
|
box { <-0.89, 0.01, -1> <0.89, Hc-0.01, 0.79> }
|
|
#local Hc = Hc * 0.75;
|
|
cylinder { <-1, Hc, -0.29>, <1, Hc, 0.29>, 0.09 }
|
|
#undef Hc
|
|
}
|
|
}
|
|
|
|
/*
|
|
* comparaison des deux textures par le rendu
|
|
* de la meme forme de cabane.
|
|
*/
|
|
#declare Cabane_Base_1 = object
|
|
{
|
|
object { Base_cabane_forme }
|
|
texture { T_Beton_1 }
|
|
}
|
|
|
|
#declare Cabane_Base_2 = object
|
|
{
|
|
object { Base_cabane_forme }
|
|
texture { T_Beton_2 }
|
|
}
|
|
// ------------------------------------------------------ ##
|
|
|
|
#declare Compteur = object
|
|
{
|
|
#local Texte = str(clock, 3, 0);
|
|
#debug concat("Texte du compteur ", Texte, "\n\n")
|
|
text {
|
|
ttf "datas/ComicMono.ttf" Texte 0.1, 0
|
|
texture { T_WIP_alert }
|
|
}
|
|
}
|
|
#declare Cabane_Compteur = object
|
|
{
|
|
union {
|
|
object { Compteur scale 0.55
|
|
translate <-0.46, 0.22, 0.32> }
|
|
object { Cabane_Base_2 }
|
|
}
|
|
}
|
|
|
|
/* ======================================================= */
|
|
#declare GroundBase_Sol = object
|
|
{
|
|
intersection {
|
|
height_field {
|
|
png "datas/hf.png" smooth
|
|
translate <-.5, 0, -.5>
|
|
#local SC = SzSol * 1.130;
|
|
scale <SC, 0.90, SC>
|
|
texture {
|
|
pigment {
|
|
image_map { png "datas/cmap.png" }
|
|
rotate x*90
|
|
translate <-.5, 0, -.5>
|
|
scale <SC, 1, SC>
|
|
}
|
|
}
|
|
}
|
|
cylinder { -y*5, y*5, SzSol*0.45 }
|
|
}
|
|
finish { phong 0.096 }
|
|
translate y*H_sol
|
|
}
|
|
|
|
/* ======================================================= */
|
|
#declare GroundBase_a = object
|
|
{
|
|
/*
|
|
C'est quoi ce truc ?
|
|
*/
|
|
union {
|
|
#local Dx = 1.5;
|
|
#local Dz = 1.0;
|
|
box { <-Dx, 0, -Dz>, <Dx, H_base, Dz> }
|
|
#local Ha = y*(H_base*2);
|
|
cylinder { 0, Ha, 0.08 translate < Dx, 0, -Dz> }
|
|
cylinder { 0, Ha, 0.08 translate <-Dx, 0, -Dz> }
|
|
#local Hb = Ha * 1.17;
|
|
cone { Ha, 0.08, Hb, 0.05 translate < Dx, 0, -Dz> }
|
|
cone { Ha, 0.08, Hb, 0.05 translate <-Dx, 0, -Dz> }
|
|
#undef Ha
|
|
#undef Hb
|
|
#undef Dx
|
|
#undef Dz
|
|
}
|
|
texture { T_Grnt7 rotate 49 scale 0.333 }
|
|
}
|
|
|
|
/* ------------------------------------------------------------ */
|
|
|
|
#declare GroudBase_coin = object
|
|
{
|
|
merge {
|
|
cylinder { 0, y*0.5, 0.10 }
|
|
sphere { 0, 0.10 scale <1, 0.23, 1> translate y*0.5 }
|
|
}
|
|
}
|
|
|
|
#declare GroundBase_estrade = object
|
|
{
|
|
#local Sz = SzBase - 0.14;
|
|
#local Hc = H_base;
|
|
union {
|
|
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
|
object { GroudBase_coin translate <-Sz, Hc, -Sz> }
|
|
object { GroudBase_coin translate < Sz, Hc, -Sz> }
|
|
object { GroudBase_coin translate <-Sz, Hc, Sz> }
|
|
object { GroudBase_coin translate < Sz, Hc, Sz> }
|
|
}
|
|
texture { T_Grnt27 rotate 9 scale 0.32 }
|
|
#undef Sz
|
|
#undef Hc
|
|
}
|
|
|
|
/* ------------------------------------------------------------ */
|
|
|
|
#declare La_GroundBase = object
|
|
{
|
|
union {
|
|
object { GroundBase_Sol }
|
|
object { GroundBase_estrade translate y*H_sol }
|
|
/*
|
|
* ici, mettre la cabane
|
|
*/
|
|
#local Dz = <0, 0, -7>;
|
|
object { GroundBase_a translate Dz }
|
|
object { Cabane_Compteur rotate y*180
|
|
translate Dz + y*H_base }
|
|
#undef Dz
|
|
}
|
|
translate y*(H_sol+H_base)
|
|
}
|
|
|
|
/* ======================================================= */
|