a lot of little changes

This commit is contained in:
Tonton Th
2025-11-13 02:15:11 +01:00
parent 030f2fb2cf
commit 0b04ffd359
17 changed files with 152 additions and 124 deletions

View File

@@ -14,7 +14,7 @@
merge {
cylinder { 0, y/2, 0.07 }
cylinder { 0, y/6, 0.33 }
cylinder { 0, y/8, 0.37 }
#local R = rand(Rng1);
#if ( R < 0.52)
texture { T_Beton_1 }
@@ -30,22 +30,23 @@ merge {
#macro Chose_le_corps () // = object
merge {
difference {
cone { -1.2*y, 0.81, 0.2*y, 1.12 }
cone { -1.2*y, 0.81, 0.2*y, 1.07 }
sphere { 0.2*y 0.73 }
}
#local CK = NormClock * (9.876+rand(Rng1));
#for (Foo, 0, 7)
#local C2X = 3.4 * sin(CK+rand(Rng1)) * sin(CK*3);
#local C2Z = 2.3 * (sin(-CK+rand(Rng1)) * cos(CK*(5+rand(Rng1))));
#local CK2 = CK + Foo;
#local C2X = 2.4 * sin(CK2+rand(Rng1)) * sin(CK*3);
#local C2Z = 2.3 * (sin(-CK2+rand(Rng1)) * cos(CK*(rand(Rng1))));
#local R = 0.06+(0.04*Cos_010(NormClock));
#local H = 4.2;
cylinder { 0, <C2X, H, C2Z>, R }
sphere { <C2X, H, C2Z>, R }
#end
#if (rand(Rng1) < 0.52)
texture { tPlasticOrange }
#else
texture { tPlasticGreen }
#local R = rand(Rng1);
#if (R < 0.33) texture { tPlasticOrange }
#elseif (R < 0.66) texture { tPlasticBlue }
#else texture { tPlasticGreen }
#end // if
scale <0.62, 0.5, 0.61>
@@ -94,15 +95,17 @@ prism {
#else
texture { T_Beton_2 }
#end // if
scale 0.666
}
#end // macro
// ------------------------------------------------------ ##
#macro HexaPole_tubes ()
#local R = 0.06;
#local E = 0.725;
#local H = H_cone*3;
#local R = 0.04;
#local E = 0.58;
#local H = H_cone*1.8;
union {
#for (A, 0, 359, 60)
#local Xp = E * cos(radians(A));
@@ -111,13 +114,13 @@ union {
#local H2 = H + rand(Rng1) + rand(Rng1);
cylinder { 0, y*H2, R }
sphere { 0, R*2 scale <1, 0.666, 1> }
sphere { 0, R*2 scale <1, 0.555, 1> translate y*H2 }
sphere { 0, R*2 scale <1, 1.555, 1> translate y*H2 }
#local Ra = rand(Rng1);
#if (Ra < 0.25)
texture { T_Chrome_1A }
#elseif (Ra < 0.50)
texture { T_Chrome_4D }
#elseif (Ra < 0.85)
#elseif (Ra < 0.75)
texture { T_Brass_2C }
#else
texture { Soft_Silver }
@@ -141,37 +144,34 @@ union {
#macro HexaPole ()
union {
object { Base_hexapole () scale <0.24, 0.2, 0.24> }
object { HexaPole_tubes () translate y*0.25 }
object { HexaPole_tubes () translate y*0.20 }
rotate y*(53*rand(Rng1))
}
#end // macro
// =======================================================
#declare OpenBox = object
{
#macro OpenBox (D, R)
union {
#local R = 0.021;
/* les verticales */
cylinder { <-1, -1, -1>, <-1, 1, -1>, R }
cylinder { < 1, -1, -1>, < 1, 1, -1>, R }
cylinder { <-1, -1, 1>, <-1, 1, 1>, R }
cylinder { < 1, -1, 1>, < 1, 1, 1>, R }
cylinder { <-D, -D, -D>, <-D, D, -D>, R }
cylinder { < D, -D, -D>, < D, D, -D>, R }
cylinder { <-D, -D, D>, <-D, D, D>, R }
cylinder { < D, -D, D>, < D, D, D>, R }
/* en bas */
cylinder { < 1, -1, 1>, <-1, -1, 1>, R }
cylinder { < 1, -1, -1>, <-1, -1, -1>, R }
cylinder { <-1, -1, 1>, <-1, -1, -1>, R }
cylinder { < 1, -1, 1>, < 1, -1, -1>, R }
cylinder { < D, -D, D>, <-D, -D, D>, R }
cylinder { < D, -D, -D>, <-D, -D, -D>, R }
cylinder { <-D, -D, D>, <-D, -D, -D>, R }
cylinder { < D, -D, D>, < D, -D, -D>, R }
/* en haut */
cylinder { < 1, 1, 1>, <-1, 1, 1>, R }
cylinder { < 1, 1, -1>, <-1, 1, -1>, R }
cylinder { <-1, 1, 1>, <-1, 1, -1>, R }
cylinder { < 1, 1, 1>, < 1, 1, -1>, R }
cylinder { < D, D, D>, <-D, D, D>, R }
cylinder { < D, D, -D>, <-D, D, -D>, R }
cylinder { <-D, D, D>, <-D, D, -D>, R }
cylinder { < D, D, D>, < D, D, -D>, R }
#undef R
texture { Soft_Silver scale 6.50 }
}
}
#end
// =======================================================
/*
* first written macro for testing the generation of