95 lines
2.2 KiB
PHP
95 lines
2.2 KiB
PHP
|
|
#declare Trid_length = 2;
|
|
|
|
// ------------------------------------------------------
|
|
#declare Trid_cone = object
|
|
{
|
|
merge {
|
|
cone { 0, R_basecone, y*0.89, 0.0001 }
|
|
sphere { 0, R_basecone }
|
|
}
|
|
}
|
|
|
|
#macro Trid_A_cone ()
|
|
difference {
|
|
object { Trid_cone }
|
|
object { Trid_cone translate -y*0.001 }
|
|
#local Foo = rand(Rng1);
|
|
#if (Foo < 0.25) texture { T_Brass_2C }
|
|
#elseif (Foo < 0.50) texture { tPlasticOrange }
|
|
#elseif (Foo < 0.75) texture { T_Chrome_3A }
|
|
#else texture { GoldDark }
|
|
#end // else
|
|
#undef Foo
|
|
}
|
|
#end // macro
|
|
// ------------------------------------------------------
|
|
#macro Trid_A_head ()
|
|
union {
|
|
#for (A, 0, 360, 120)
|
|
#local E = 0.28;
|
|
#local Tx = E * sin(radians(A));
|
|
#local Tz = E * cos(radians(A));
|
|
object { Trid_A_cone () translate <Tx*2, 0, Tz> }
|
|
#end // for
|
|
#undef Tx
|
|
#undef Tz
|
|
torus { E*1.51, 0.012
|
|
scale <1, 3, 1> translate y*0.05
|
|
texture { T_Chrome_3B } }
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
#macro Trid_A_body ()
|
|
#local L = Trid_length / 2;
|
|
#local R = 0.095;
|
|
merge {
|
|
cylinder { <0, -L, 0>, <0, L, 0>, R }
|
|
sphere { 0, R scale <1, 6.11, 1> translate y*L }
|
|
sphere { 0, R scale <1, 0.42, 1> translate -y*L }
|
|
#local R = rand(Rng1);
|
|
#if ( R < 0.333) texture { T_Chrome_1C }
|
|
#elseif ( R < 0.666) texture { T_Silver_1C }
|
|
#else texture { tPlasticGreen }
|
|
#end
|
|
}
|
|
#undef L
|
|
#end // macro
|
|
// ------------------------------------------------------
|
|
#macro Trid_A_ailette ()
|
|
union {
|
|
#local E = 0.49;
|
|
object { Trid_A_cone () scale 0.85 translate <E, -0.05, 0> }
|
|
cylinder { 0, x*E, 0.008 scale <1, 5, 1> }
|
|
#local R = rand(Rng1);
|
|
#if ( R < 0.8 ) texture { T_Silver_3A }
|
|
#else texture { B_Texture }
|
|
#end
|
|
#undef E
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
#macro Trid_A_tail ()
|
|
union {
|
|
#for (A, 0, 360, 120)
|
|
object { Trid_A_ailette () rotate (A+270)*y }
|
|
#end // for
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
// ------------------------------------------------------
|
|
#macro Trident_A ()
|
|
union {
|
|
object { Trid_A_head () translate y*0.83 }
|
|
object { Trid_A_body () }
|
|
object { Trid_A_tail () translate -y*0.6 }
|
|
// object { Repere translate <0.1, 0, 0.1> }
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|