66 lines
1.3 KiB
PHP
66 lines
1.3 KiB
PHP
|
|
#declare Trid_length = 2;
|
|
|
|
// ------------------------------------------------------
|
|
#declare Trid_cone = object
|
|
{
|
|
cone { 0, R_basecone, y*0.89, 0.0001 }
|
|
}
|
|
|
|
#macro Trid_A_cone ()
|
|
difference {
|
|
object { Trid_cone }
|
|
object { Trid_cone }
|
|
#local Foo = rand(Rng1);
|
|
#if (Foo < 0.333)
|
|
pigment { color Red }
|
|
#elseif (Foo < 0.666)
|
|
pigment { color Green }
|
|
#else
|
|
pigment { color Blue }
|
|
#end // else
|
|
#undef Foo
|
|
}
|
|
#end // macro
|
|
// ------------------------------------------------------
|
|
#macro Trid_A_head ()
|
|
union {
|
|
#for (A, 0, 360, 120)
|
|
#local E = 0.44;
|
|
#local Tx = E * sin(radians(A));
|
|
#local Ty = 0;
|
|
#local Tz = E * cos(radians(A));
|
|
object { Trid_A_cone () translate <Tx, Ty, Tz> }
|
|
#undef Tx
|
|
#undef Ty
|
|
#undef Tz
|
|
#end // for
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
#declare Trid_A_body = object
|
|
{
|
|
#local L = Trid_length / 2;
|
|
merge {
|
|
cylinder { <0, -L, 0>, <0, L, 0>, 0.065 }
|
|
sphere { 0, 0.065 scale <1, 4, 1> translate y*L }
|
|
texture { WIP_color }
|
|
}
|
|
#undef L
|
|
}
|
|
// ------------------------------------------------------
|
|
// ------------------------------------------------------
|
|
#macro Trident_A ()
|
|
union {
|
|
object { Trid_A_head () translate y*0.95 }
|
|
object { Trid_A_body }
|
|
// object { Trid_A_tail }
|
|
}
|
|
#end
|
|
// ------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|