75 lines
1.9 KiB
PHP
75 lines
1.9 KiB
PHP
/*
|
|
* H E X A S T A R
|
|
*
|
|
* nouveau du dernier jour de 2025, courage paur 2026 <3
|
|
*/
|
|
|
|
/* ------------------------------------------------------------ */
|
|
/* ============================================================ */
|
|
/* Un des six éléments de base */
|
|
|
|
#declare HS_radius = 0.407;
|
|
|
|
#macro HS_element_a ()
|
|
union {
|
|
#local R_a = HS_radius * 0.33333;
|
|
#local Small = 0.00001;
|
|
cone { <-1.34, 0, 0>, Small, <-0.6, 0, 0>, R_a }
|
|
sphere { 0, R_a scale <0.3, 1, 1> translate <-0.6, 0, 0> }
|
|
cone { < 1.34, 0, 0>, Small, < 0.6, 0, 0>, R_a }
|
|
sphere { 0, R_a scale <0.3, 1, 1> translate < 0.6, 0, 0> }
|
|
#local R = rand(Rng1);
|
|
#if ( R < 0.50 ) texture { GoldDark }
|
|
#else texture { T_Gold_3C }
|
|
#end
|
|
}
|
|
#end // macro
|
|
/* ------------------------------------------------------------ */
|
|
/*
|
|
* element central --- À REFAIRE EN MACRO !
|
|
*/
|
|
#declare HS_element_central = object
|
|
{
|
|
union {
|
|
torus { HS_radius*0.93, 0.0180 }
|
|
#local L = 0.0035;
|
|
cylinder { -y*L, y*L, 0.057 }
|
|
sphere { 0, 0.057 translate -y*L }
|
|
sphere { 0, 0.057 translate y*L }
|
|
}
|
|
scale <1, 25.90, 1>
|
|
rotate z*90
|
|
#local R = rand(Rng1);
|
|
#if ( R < 0.33 ) texture { Y_Texture }
|
|
#elseif ( R < 0.66 ) texture { T_Gold_1A }
|
|
#else texture { Aluminum }
|
|
#end
|
|
}
|
|
|
|
/* ============================================================ */
|
|
/* On regroupe les six élements */
|
|
#declare HS_les_elements = object
|
|
{
|
|
union {
|
|
#for (Foo, 0, 360, 60)
|
|
#local E = HS_radius;
|
|
#local Ty = E * cos(radians(Foo));
|
|
#local Tz = E * sin(radians(Foo));
|
|
object {
|
|
HS_element_a ()
|
|
translate <0, Ty, Tz>
|
|
}
|
|
#end // end for
|
|
object { HS_element_central }
|
|
}
|
|
}
|
|
/* ============================================================ */
|
|
/* Et voici l'engin final */
|
|
#declare HexaStar = object
|
|
{
|
|
object { HS_les_elements }
|
|
}
|
|
// #debug "++++++++++ hexastar loaded !\n"
|
|
|
|
/* ============================================================ */
|