more experiment

This commit is contained in:
Tonton Th 2025-10-19 19:09:46 +02:00
parent d911af44c6
commit 18c84133b6

View File

@ -20,7 +20,7 @@
/* nouveau du 7 octobre 2025 */
#macro Une_Boule ()
sphere {
0, 0.25
0, 0.18
#local R = rand(Rng1);
#if (R < 0.333)
pigment { color Red }
@ -32,14 +32,17 @@ sphere {
}
#end // macro
/* TODO
* trouver une meilleure méthode de placement
*/
#declare Les_Boules = object
{
union {
#for (A, 0, 12, 1)
#for (A, 0, 24, 1)
object { Une_Boule ()
#local TX = 1.2 * (0.5 - NormClock);
#local TY = 2 * Cos_010(abs(sin(clock)));
#local TZ = 3.31 * cos(NormClock*888);
#local TX = 2.6 * (A/10) * (0.5 - NormClock);
#local TY = 2 * abs(sin(clock*0.07*A));
#local TZ = 3.0 * cos(NormClock*0.08*A);
translate <TX, TY, TZ>
}
#end // for
@ -50,8 +53,54 @@ finish { ambient 0 phong 1 }
scale 1.3333333
}
// =======================================================
/*
* nouveau du 12 octobre 2025
*/
#debug " ACTION !!!\n"
#macro Cahute_0 ()
#debug "Enter macro Cahute_0\n"
difference {
#local KX = 0.70;
#local KH = 1.60 + rand(Rng1) + rand(Rng1);
#local KZ = KX + (0.24*rand(Rng1));
box { <-KX, 0, -KZ>, <KX, KH, KZ> }
#local KX = KX * 0.99;
#local KH = KH * 0.99;
#local KZ = KZ * 0.99;
box { <-KX, 0, -KZ>, <KX, KH, KZ> }
cylinder { <-10, KH/2, 0>, <10, KH/2, 0>, KX * 0.741 }
#local R = rand(Rng1);
#debug concat("Random = ", str(R, 6, 4), "\n")
#if ( R < 0.33 )
texture { Flashy scale <17, 23, 5> }
#elseif ( R < 0.66 )
texture { T_Beton_1 }
#else
texture { T_Beton_2 }
#end // if
rotate y * (77 * rand(Rng1))
}
#end // macro
#declare Les_Cahutes = object
{
union {
#local K = 2.70;
object { Cahute_0 () translate -x * K }
object { Cahute_0 () translate x * K }
object { Cahute_0 () translate -z * K }
object { Cahute_0 () translate z * K }
}
rotate y * (clock*3.33)
}
// =======================================================
#debug "ACTION !!!\n"
// ------------------------------------------------------ ##
@ -61,9 +110,9 @@ scale 1.3333333
#local RZ = 96 - (54*Cos_010(NormClock));
union {
object { Trident_A () rotate <RX, 0, RZ>
translate < -1.4, 1.2, 0> }
translate < -1.5, 1.0, 0> }
object { Trident_A () rotate <0, clock, 0>
translate < 1.4, 2.0, 0> }
translate < 1.5, 1.8, 0> }
}
}
@ -73,7 +122,7 @@ union {
{
union {
#for (I, 0, 359, 30)
#declare E = 9;
#declare E = 11;
#declare Dx = E * sin(radians(I));
#declare Dz = E * cos(radians(I));
object { GyroPhare () translate <Dx, 0, Dz> }
@ -83,35 +132,29 @@ union {
}
// ------------------------------------------------------ ##
// object { Gyros }
object { Gyros }
#declare Selector = mod(int(clock/32), 6);
#declare Selector = mod(int(clock/30), 6);
#debug concat("Selector = ", str(Selector, 6, 0), "\n")
#switch (Selector)
#case (0)
object { Tridents scale 1.2 rotate -y*(clock*0.666) }
#debug " Tridents\n"
object { Tridents scale 1.12 rotate -y*(clock*0.666) }
#break
#case (1)
object { HexaPole () }
#debug " Hexapole\n"
object { Les_Cahutes scale 0.50 }
#break
#case (2)
object { HexaWood translate y }
#debug " Hexawood !!!\n"
object { HexaWood rotate -y*(clock*0.38) translate y }
#break
#case (3)
object { Chose rotate y*clock }
#debug " Chose\n"
object { Chose rotate x*5 rotate y*clock }
#break
#case (4)
object { HexaBenz () scale 2 translate 2.7*y rotate -y*clock }
#debug " HexaBenz\n"
#break
#case (5)
object { Les_Boules translate y*1.33 }
#debug " boules\n"
object { Les_Boules translate y }
#break
#end // switch selector
@ -121,7 +164,7 @@ plane {
texture { T_Planete_B scale 0.666 }
}
object { Repere translate y*0.8 }
object { Repere translate y*1.0 }
// =======================================================
@ -131,11 +174,13 @@ object { Repere translate y*0.8 }
#local K = 8.6;
#local CamX = CamX * K;
#local CamY = CamY * K * 0.65;
#local CamY = CamY * K * 0.61;
#local CamZ = CamZ * K;
camera {
// orthographic
#if (clock < 225)
orthographic
#end
location <CamX, CamY, CamZ>
look_at <0, 1.4, 0>
angle 12 - 3*Cos_01(NormClock)