randomize des poteaux

This commit is contained in:
Tonton Th
2026-06-29 15:59:11 +02:00
parent 1e11d7316e
commit 4149fa6cc1

View File

@@ -20,37 +20,40 @@ texture { New_Penny scale 0.3 }
// ----------------------------------------------------------------- // -----------------------------------------------------------------
#declare Base_Poteau_1 = object #macro Base_Poteau_1 (Foo)
{
union union
{ {
box { <-1, 0, -1>, <-0.08, 1.6, 1.5> } box { <-1, 0, -1>, <-0.08, 1.6, 1.5> }
box { <0.08, 0, -1.5>, <1, 1.6, 1> } box { <0.08, 0, -1.5>, <1, 1.6, 1> }
} texture {
texture
{
pigment { color Gray75 } pigment { color Gray75 }
normal { bumps 0.333 } #local R = rand(RND);
#if (R < 0.50) normal { bumps 0.333 }
#else normal { dents 0.333 }
#end // if R
} }
} }
#end // macro
#declare Bois_Poteau_1 = object #macro Bois_Poteau_1 (Foo)
{
union union
{ {
cylinder { <0, 0, 0>, <0, 20, 0>, 0.42 } cylinder { <0, 0, 0>, <0, 20, 0>, 0.42 }
cone { <0, 20, 0>, 0.64, <0, 21, 0>, 0.21 } cone { <0, 20, 0>, 0.64, <0, 21, 0>, 0.21 }
cylinder { <-4, 19, 0>, <4, 19, 0>, 0.20 } cylinder { <-4, 19, 0>, <4, 19, 0>, 0.20 }
#local R = rand(RND);
#if (R < 0.76) texture { T_Wood12 rotate x*90 scale 3 }
#else texture { T_Wood14 rotate x*90 scale 3 }
#end
} }
texture { T_Wood12 rotate x*90 scale 3 } #end // macro
}
#declare Poteau_1 = object #declare Poteau_1 = object
{ {
union union
{ {
object { Base_Poteau_1 } object { Base_Poteau_1 (0) }
object { Bois_Poteau_1 } object { Bois_Poteau_1 (0) }
} }
} }