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