redesign of "Chose"
This commit is contained in:
parent
83d4e55871
commit
454b2ddfbb
59
gadgets.inc
59
gadgets.inc
@ -4,38 +4,41 @@
|
||||
*/
|
||||
|
||||
/* ======================================================= */
|
||||
#declare R_C = 0.79;
|
||||
|
||||
/* ce truc mérite un nom plus parlant ! */
|
||||
#macro Chose_le_pied ()
|
||||
#local RCP = 0.70;
|
||||
merge {
|
||||
#local RCP = 0.54;
|
||||
cylinder { 0, y/2, 0.07 }
|
||||
cone { y*0.125, RCP, y*0.250, 0.07 }
|
||||
cylinder { 0, y*0.125, RCP }
|
||||
#local R = rand(Rng1);
|
||||
#if ( R < 0.52) texture { T_Beton_1 }
|
||||
#else texture { T_Beton_2 }
|
||||
#end
|
||||
#if (R < 0.25) texture { tPlasticOrange }
|
||||
#elseif (R < 0.50) texture { tPlasticBlue }
|
||||
#elseif (R < 0.75) texture { tPlasticPrune }
|
||||
#else texture { tPlasticGreen }
|
||||
#end // if
|
||||
}
|
||||
#debug "== Fin chose le pied\n"
|
||||
#end // macro
|
||||
// ------------------------------------------------------ ##
|
||||
/*
|
||||
* Il doit être possible de dissocier le noyau des tiges */
|
||||
|
||||
#macro Chose_le_corps () // = object
|
||||
* Il doit être possible de dissocier le noyau des tiges
|
||||
* 29 novembre 2025, je tente l'expérience
|
||||
*/
|
||||
#macro Chose_les_tiges ()
|
||||
merge {
|
||||
difference {
|
||||
cone { -1.2*y, 0.78, 0.2*y, 1.04 }
|
||||
sphere { 0.2*y 0.73 }
|
||||
}
|
||||
#local CK = NormClock * (9.876+rand(Rng1));
|
||||
#local CK = NormClock * (7.876+rand(Rng1));
|
||||
#for (Foo, 0, 7)
|
||||
#local CK2 = CK + Foo;
|
||||
#local C2X = 1.2 * sin(CK2+rand(Rng1)) * sin(CK*3);
|
||||
#local C2Z = 1.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 }
|
||||
#local C2X = (R_C + 0.2) * sin(CK2+rand(Rng1)) * sin(CK*3);
|
||||
#local C2Z = (R_C + 0.3) * (sin(-CK2+rand(Rng1)) *
|
||||
cos(CK*(rand(Rng1))));
|
||||
#local Rt = 0.04+(0.06*Cos_010(NormClock));
|
||||
#local H = 3.2;
|
||||
cylinder { 0, <C2X, H, C2Z>, Rt }
|
||||
sphere { <C2X, H, C2Z>, Rt }
|
||||
#end
|
||||
#local R = rand(Rng1);
|
||||
#if (R < 0.25) texture { tPlasticOrange }
|
||||
@ -43,17 +46,31 @@ merge {
|
||||
#elseif (R < 0.75) texture { tPlasticPrune }
|
||||
#else texture { tPlasticGreen }
|
||||
#end // if
|
||||
|
||||
scale <0.62, 0.5, 0.61>
|
||||
rotate -y*clock
|
||||
translate y*1.05
|
||||
}
|
||||
#debug "== Fin chose les tiges\n"
|
||||
#end // macro
|
||||
// ------------------------------------------------------ ##
|
||||
#macro Chose_le_corps () // = object
|
||||
difference {
|
||||
cone { 0, R_C*0.72, 1.2*y, R_C }
|
||||
sphere { 1.2*y R_C*0.73 }
|
||||
#local R = rand(Rng1);
|
||||
#if (R < 0.25) texture { tPlasticOrange }
|
||||
#elseif (R < 0.50) texture { tPlasticBlue }
|
||||
#elseif (R < 0.75) texture { tPlasticPrune }
|
||||
#else texture { tPlasticGreen }
|
||||
#end // if
|
||||
translate y*0.50
|
||||
}
|
||||
#debug "== Fin chose le corps\n"
|
||||
#end // macro
|
||||
// ------------------------------------------------------ ##
|
||||
#macro Chose ()
|
||||
union {
|
||||
Chose_le_pied ()
|
||||
Chose_le_corps ()
|
||||
Chose_les_tiges ()
|
||||
}
|
||||
#end // macro
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user