working on groundbase
This commit is contained in:
126
groundbase.inc
Normal file
126
groundbase.inc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* _ _
|
||||
* __ _ _ __ ___ _ _ _ __ __| || |__ __ _ ___ ___
|
||||
* / _` || '__|/ _ \ | | | || '_ \ / _` || '_ \ / _` |/ __| / _ \
|
||||
* | (_| || | | (_) || |_| || | | || (_| || |_) || (_| |\__ \| __/
|
||||
* \__, ||_| \___/ \__,_||_| |_| \__,_||_.__/ \__,_||___/ \___|
|
||||
* |___/
|
||||
*
|
||||
* 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 GroundBase_Sol = object
|
||||
{
|
||||
intersection {
|
||||
height_field {
|
||||
png "datas/hf.png" smooth
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
texture {
|
||||
pigment {
|
||||
image_map { png "datas/cmap.png" }
|
||||
rotate x*90
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
}
|
||||
}
|
||||
}
|
||||
cylinder { -y*5, y*5, SzSol*0.45 }
|
||||
}
|
||||
finish { phong 0.105 }
|
||||
translate y*H_sol
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
#declare GroundBase_a = object
|
||||
{
|
||||
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> }
|
||||
#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.22 }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare GroudBase_coin = object
|
||||
{
|
||||
merge {
|
||||
cylinder { 0, y*0.5, 0.09 }
|
||||
sphere { 0, 0.10 scale <1, 0.23, 1> translate y*0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
#declare GroundBase_b = object
|
||||
{
|
||||
#local Sz = SzBase - 0.14;
|
||||
union {
|
||||
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
||||
object { GroudBase_coin translate <-Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate <-Sz, 0, Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, Sz> }
|
||||
}
|
||||
texture { T_Grnt27 rotate 9 scale 0.32 }
|
||||
#undef Sz
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare La_GroundBase = object
|
||||
{
|
||||
union {
|
||||
object { GroundBase_Sol }
|
||||
object { GroundBase_b translate y*H_sol }
|
||||
/*
|
||||
* ici, mettre la cabane
|
||||
*/
|
||||
#local Dz = <0, 0, -7>;
|
||||
// object { GroundBase_a translate Dz }
|
||||
object { Cabane_Base_2 rotate y*180 translate Dz }
|
||||
}
|
||||
translate y*(H_sol+H_base)
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
Reference in New Issue
Block a user