gigantic refactoring, part one
This commit is contained in:
87
hexabenz.inc
87
hexabenz.inc
@@ -3,15 +3,16 @@
|
||||
*/
|
||||
// =======================================================
|
||||
|
||||
#declare Benz_Cone_Base = object
|
||||
{
|
||||
#local RA = 0.120;
|
||||
#local RB = 0.001;
|
||||
#macro Benz_Cone_Base () // = object
|
||||
// {
|
||||
union {
|
||||
cone { 0, RA, y, RB }
|
||||
sphere { 0, RA*1.098 scale <1, 0.62, 3.2> translate -0.02*y }
|
||||
#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
|
||||
// {
|
||||
@@ -20,9 +21,10 @@ union {
|
||||
#local E = 0.40;
|
||||
#local Tx = E * sin(radians(foo));
|
||||
#local Ty = E * cos(radians(foo));
|
||||
object { Benz_Cone_Base
|
||||
object {
|
||||
Benz_Cone_Base ()
|
||||
#if ( rand(Rng1) < 0.5 )
|
||||
texture { Soft_Silver scale 16.50 }
|
||||
texture { T_Silver_2C scale 11.50 }
|
||||
#else
|
||||
texture { T_Brass_2C scale 13.50 }
|
||||
#end
|
||||
@@ -36,21 +38,22 @@ union {
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
#local RT = 0.24;
|
||||
#local LT = 0.61;
|
||||
#local RT = 0.21;
|
||||
#local LT = 0.54;
|
||||
|
||||
#declare Benz_Tubules = object
|
||||
{
|
||||
union {
|
||||
#local E = 0.17;
|
||||
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 Dz = z * 1.09;
|
||||
cylinder { -Dz, Dz, R translate <Tx, Ty, 0> }
|
||||
sphere { -Dz, R translate <Tx, Ty, 0> }
|
||||
sphere { Dz, R translate <Tx, Ty, 0> }
|
||||
#local Dza = z * 0.20;
|
||||
#local Dzb = z * 0.90;
|
||||
cylinder { -Dza, Dzb, R translate <Tx, Ty, 0> }
|
||||
sphere { -Dza, R*1.8 translate <Tx, Ty, 0> }
|
||||
sphere { Dzb, R*1.8 translate <Tx, Ty, 0> }
|
||||
#end
|
||||
}
|
||||
#if ( rand(Rng1) < 0.333)
|
||||
@@ -62,38 +65,64 @@ union {
|
||||
|
||||
#declare Benz_Fuseau = object
|
||||
{
|
||||
sphere { 0, RT*0.39 scale <1, 1, 9> }
|
||||
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 <rand(Rng2), rand(Rng2), rand(Rng2)>
|
||||
fade_distance 0.96
|
||||
fade_power 1.95
|
||||
|
||||
}
|
||||
}
|
||||
rotate -z*clock*6
|
||||
}
|
||||
|
||||
#declare Benz_Cylindre = object
|
||||
{
|
||||
difference {
|
||||
union {
|
||||
cylinder { z*LT*1.6, -z*LT, RT }
|
||||
sphere { z*LT*1.5, RT*0.72 translate y*RT*0.87}
|
||||
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 }
|
||||
}
|
||||
|
||||
#declare Benz_Tube = object
|
||||
{
|
||||
#macro Benz_Tube ()
|
||||
// #declare Benz_Tube = object
|
||||
// {
|
||||
union {
|
||||
object { Benz_Tubules }
|
||||
object { Benz_Fuseau }
|
||||
object { Benz_Fuseau_Flash translate z*0.40 }
|
||||
object { Benz_Cylindre }
|
||||
}
|
||||
}
|
||||
// }
|
||||
#end
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
#declare HexaBenz = object
|
||||
{
|
||||
#macro HexaBenz ()
|
||||
// #declare HexaBenz = object
|
||||
// {
|
||||
union {
|
||||
#local Rk = rand(Rng1) * 666.666;
|
||||
#local Rk = (rand(Rng1)-0.5) * 2038;
|
||||
object { Benz_Cones () rotate z*NormClock*Rk}
|
||||
object { Benz_Tube }
|
||||
object { Benz_Tube () }
|
||||
}
|
||||
}
|
||||
// }
|
||||
#end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user