HexaCone/hexabenz.inc
2025-01-05 00:18:06 +01:00

90 lines
1.7 KiB
PHP

/*
* H E X A C O N E
*/
// =======================================================
#declare Benz_Cone_Base = object
{
#local RA = 0.123;
#local RB = 0.001;
union {
cone { 0, RA, y, RB }
// cylinder { 0, -0.08*y, RA*1.25 scale <1, 1, 4> }
sphere { 0, RA*1.092 scale <1, 0.64, 6> translate -0.02*y }
}
}
#declare 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
texture { Soft_Silver scale 16.50 }
rotate -z*foo
translate <Tx, Ty, 0>
}
#end
}
}
// ------------------------------------------------------
#local RT = 0.24;
#local LT = 0.67;
#declare Benz_Tubules = object
{
union {
#local E = 0.17;
#local R = 0.010;
#for (foo, 0, 360, 20)
#local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo));
#local Dz = z * 2.02;
cylinder { -Dz, Dz, R translate <Tx, Ty, 0> }
sphere { -Dz, R translate <Tx, Ty, 0> }
sphere { Dz, R translate <Tx, Ty, 0> }
#end
}
texture { Yellow_Glass }
}
#declare Benz_Fuseau = object
{
sphere { 0, RT*0.39 scale <1, 1, 9> }
texture { Gold_Nugget scale 0.56 }
}
#declare Benz_Cylindre = object
{
difference {
union {
cylinder { z*LT*2.08, -z*LT, RT }
sphere { z*LT*1.7, RT*0.72 translate y*RT*0.87}
}
cylinder { z*4, -z*4, RT*0.95 }
}
texture { Soft_Silver scale 6.0 }
}
#declare Benz_Tube = object
{
union {
object { Benz_Tubules }
object { Benz_Fuseau }
object { Benz_Cylindre }
}
}
// ------------------------------------------------------
#declare HexaBenz = object
{
union {
object { Benz_Cones rotate z*NormClock*99.999}
object { Benz_Tube }
}
}