HexaCone/hexabenz.inc
2025-01-16 01:11:56 +01:00

132 lines
2.4 KiB
PHP

/*
* H E X A B E N Z
*/
// =======================================================
#macro Benz_Cone_Base () // = object
// {
union {
#local RA = R_basecone;
#local RB = 0.001;
cone { 0, RA, y*0.89, 0.0001 }
sphere { 0, RA*1.098 scale <1, 0.62, 3.03> translate -0.02*y }
}
// }
#end
#macro Benz_Cones () // = object
// {
union {
#for (foo, 0, 360, 60)
#local E = 0.38;
#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 <Tx, Ty, 0>
}
#end
}
// }
#end
// ------------------------------------------------------
#local R_Tube = 0.20;
#local L_Tube = 0.54;
#declare Benz_Tubules = object
{
merge {
#local E = R_Tube * 0.75;
#local R = 0.01;
#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 <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)
texture { Orange_Glass }
#else
texture { Yellow_Glass }
#end
}
#declare Benz_Fuseau = object
{
difference {
sphere { 0, R_Tube*0.39 }
sphere { 0, R_Tube*0.37 }
cylinder { <-1, 0, -1>, < 1, 0, 1>, R_Tube*0.21 }
cylinder { < 1, 0, -1>, <-1, 0, 1>, R_Tube*0.21 }
}
scale <1, 1, 4.4>
texture { Shadow_Clouds 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*L_Tube*1.5, -z*L_Tube, R_Tube }
/* cette sphere devrait devenir
un vrai cockpit ? */
sphere { z*L_Tube*1.18, R_Tube*0.72
scale <1, 0.73, 1>
translate y*R_Tube*0.87}
}
cylinder { z*4, -z*4, R_Tube*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) * 1024;
object { Benz_Cones () rotate z*NormClock*Rk}
object { Benz_Tube () }
}
// }
#end