/* * H E X A C O N E */ // ======================================================= #macro Benz_Cone_Base () // = object // { union { #local RA = 0.117; #local RB = 0.001; cone { 0, RA, y*0.89, RB } sphere { 0, RA*1.098 scale <1, 0.62, 3.1> translate -0.02*y } } // } #end #macro Benz_Cones () // = object // { union { #for (foo, 0, 360, 60) #local E = 0.40; #local Tx = E * sin(radians(foo)); #local Ty = E * cos(radians(foo)); object { Benz_Cone_Base () #if ( rand(Rng1) < 0.5 ) texture { T_Silver_2C scale 11.50 } #else texture { T_Brass_2C scale 13.50 } #end rotate -z*foo translate } #end } // } #end // ------------------------------------------------------ #local RT = 0.21; #local LT = 0.54; #declare Benz_Tubules = object { merge { #local E = 0.167; #local R = 0.010; #for (foo, 0, 360, 20) #local Tx = E * sin(radians(foo)); #local Ty = E * cos(radians(foo)); #local Dza = z * 0.20; #local Dzb = z * 0.90; cylinder { -Dza, Dzb, R translate } sphere { -Dza, R*1.8 translate } sphere { Dzb, R*1.8 translate } #end } #if ( rand(Rng1) < 0.333) texture { Orange_Glass } #else texture { Yellow_Glass } #end } #declare Benz_Fuseau = object { difference { sphere { 0, RT*0.39 } sphere { 0, RT*0.37 } cylinder { <-1, 0, -1>, < 1, 0, 1>, RT*0.21 } cylinder { < 1, 0, -1>, <-1, 0, 1>, RT*0.21 } } scale <1, 1, 4.4> texture { Gold_Nugget scale 0.56 } } #declare Benz_Fuseau_Flash = object { union { object { Benz_Fuseau } light_source { 0, rgb fade_distance 0.96 fade_power 1.95 } } rotate -z*clock*6 } #declare Benz_Cylindre = object { difference { union { cylinder { z*LT*1.5, -z*LT, RT } sphere { z*LT*1.4, RT*0.72 scale <1, 0.73, 1> translate y*RT*0.87} } cylinder { z*4, -z*4, RT*0.95 } } texture { Soft_Silver scale 6.0 } } #macro Benz_Tube () // #declare Benz_Tube = object // { union { object { Benz_Tubules } object { Benz_Fuseau_Flash translate z*0.40 } object { Benz_Cylindre } } // } #end // ------------------------------------------------------ #macro HexaBenz () // #declare HexaBenz = object // { union { #local Rk = (rand(Rng1)-0.5) * 2038; object { Benz_Cones () rotate z*NormClock*Rk} object { Benz_Tube () } } // } #end