#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 translate -y*0.001 } #local Foo = rand(Rng1); #if (Foo < 0.25) texture { T_Brass_2C } #elseif (Foo < 0.50) texture { T_Silver_3A } #elseif (Foo < 0.75) texture { T_Chrome_3A } #else texture { Flashy } #end // else #undef Foo } #end // macro // ------------------------------------------------------ #macro Trid_A_head () union { #for (A, 0, 360, 120) #local E = 0.21; #local Tx = E * sin(radians(A)); #local Tz = E * cos(radians(A)); object { Trid_A_cone () translate } #end // for #undef Tx #undef Tz } #end // ------------------------------------------------------ #macro Trid_A_body () #local L = Trid_length / 2; merge { cylinder { <0, -L, 0>, <0, L, 0>, 0.065 } sphere { 0, 0.065 scale <1, 6, 1> translate y*L } #if (rand(Rng1) < 0.50) texture { T_Silver_2C } #else texture { T_Copper_1E } #end } #undef L #end // macro // ------------------------------------------------------ #macro Trid_A_ailette () union { #local E = 0.46; object { Trid_A_cone () scale 0.7 translate x*E } cylinder { 0, x*E, 0.014 scale <1, 3, 1> texture { T_Silver_3A } } #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.85 } object { Trid_A_body () } object { Trid_A_tail () translate -y*0.6 } // object { Repere translate <0.1, 0, 0.1> } } #end // ------------------------------------------------------