add global constants

This commit is contained in:
Tonton Th 2025-01-13 15:27:56 +01:00
parent 540dc86601
commit 8c30830837
2 changed files with 18 additions and 8 deletions

View File

@ -2,18 +2,18 @@
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024 * nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
*/ */
#declare RA = 0.127; #declare RA = R_basecone;
#declare RB = 0.001; // #declare RB = 0.001;
#declare HexaCone_shape = object #declare HexaCone_shape = object
{ {
union { union {
cone { 0, RA, <-1, 0, 0>, RB } cone { 0, RA, <-1, 0, 0>, 0.0001 }
cone { 0, RA, < 1, 0, 0>, RB } cone { 0, RA, < 1, 0, 0>, 0.0001 }
cone { 0, RA, < 0, 0, 1>, RB } cone { 0, RA, < 0, 0, 1>, 0.0001 }
cone { 0, RA, < 0, 0, -1>, RB } cone { 0, RA, < 0, 0, -1>, 0.0001 }
cone { 0, RA, < 0, 1, 0>, RB } cone { 0, RA, < 0, 1, 0>, 0.0001 }
cone { 0, RA, < 0, -1, 0>, RB } cone { 0, RA, < 0, -1, 0>, 0.0001 }
} }
} }

View File

@ -18,7 +18,17 @@ global_settings {
#declare NormClock = clock / 360.0; #declare NormClock = clock / 360.0;
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/*
* Some constants...
*/
#declare R_basecone = 0.117;
#declare H_cone = 0.97;
/* ------------------------------------------------------------ */
/*
* Usefull macros
*/
#macro Cos_01( X ) #macro Cos_01( X )
(0.5-0.5*cos( 3.141592654 * X)) (0.5-0.5*cos( 3.141592654 * X))
#end #end