commit big mess before refactoring
This commit is contained in:
parent
f417711da3
commit
c65090e4a2
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ datas/*.webp
|
||||
WS/*timing
|
||||
WS/log*
|
||||
WS/*.done
|
||||
WS/*.log
|
||||
|
||||
*.png
|
||||
*.gif
|
||||
|
11
Makefile
11
Makefile
@ -6,12 +6,12 @@ POVDEP = contexte.inc elements.inc hexabenz.inc \
|
||||
globals.inc hexawood.inc datas/hf.png \
|
||||
dynamic.inc trident.inc
|
||||
|
||||
CK=230
|
||||
|
||||
CK=180
|
||||
|
||||
PNG: essai.png scene.png topview.png passage.png \
|
||||
orbite.png hexabenz.png escadrille.png \
|
||||
hexacone.png remote.png survol.png cutoff.png
|
||||
hexacone.png remote.png survol.png cutoff.png \
|
||||
carto.png
|
||||
echo "make PNG ck=$(CK) done" >> WS/log
|
||||
|
||||
|
||||
@ -47,3 +47,8 @@ remote.png: remote.pov Makefile $(POVDEP)
|
||||
|
||||
survol.png: survol.pov Makefile $(POVDEP)
|
||||
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
|
||||
|
||||
carto.png: carto.pov Makefile $(POVDEP)
|
||||
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
|
||||
|
||||
|
||||
|
33
carto.pov
Normal file
33
carto.pov
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* H E X A C O N E
|
||||
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
|
||||
*/
|
||||
|
||||
#version 3.7;
|
||||
|
||||
#include "globals.inc"
|
||||
|
||||
#include "contexte.inc"
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
#include "dynamic.inc"
|
||||
|
||||
// ---------------------------------------------------------
|
||||
#for (Foo, -150, 150, 10)
|
||||
cylinder { <-150, 0, Foo>, <150, 0, Foo>, 0.12 }
|
||||
cylinder { <Foo, 0, -150>, <Foo, 0, 150>, 0.12 }
|
||||
#end
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
camera {
|
||||
location <45, 126, 18>
|
||||
look_at <0, 1.18, 0.17>
|
||||
angle 50
|
||||
}
|
||||
|
37
contexte.inc
37
contexte.inc
@ -9,10 +9,6 @@
|
||||
* nouveau debut fevrier 2025 - we love raytracing
|
||||
*
|
||||
* une cabane pour faire riche.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* une seule forme de cabane pour le moment
|
||||
*/
|
||||
#declare Base_cabane_forme = object
|
||||
@ -48,8 +44,8 @@ texture { T_Beton_2 }
|
||||
#declare GroudBase_coin = object
|
||||
{
|
||||
merge {
|
||||
cylinder { 0, y*0.4, 0.09 }
|
||||
sphere { 0, 0.09 scale <1, 0.23, 1> translate y*0.4 }
|
||||
cylinder { 0, y*0.5, 0.09 }
|
||||
sphere { 0, 0.10 scale <1, 0.23, 1> translate y*0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,7 +70,7 @@ texture { T_Grnt7 rotate 49 scale 0.22 }
|
||||
|
||||
#declare GroundBase_b = object
|
||||
{
|
||||
#local Sz = SzBase - 0.02;
|
||||
#local Sz = SzBase - 0.14;
|
||||
union {
|
||||
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
||||
object { GroudBase_coin translate <-Sz, 0, -Sz> }
|
||||
@ -99,6 +95,7 @@ union {
|
||||
object { GroundBase_a translate Dz }
|
||||
object { Cabane_Base_2 rotate y*180 translate Dz }
|
||||
}
|
||||
translate y*H_sol
|
||||
}
|
||||
/* ======================================================= */
|
||||
|
||||
@ -243,31 +240,41 @@ height_field {
|
||||
// normal { bumps 0.035 scale 0.186 }
|
||||
finish { phong 0.105 }
|
||||
}
|
||||
translate y*H_sol
|
||||
}
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
|
||||
#declare UnderHoles = array[6]
|
||||
|
||||
#fopen Holes "WS/holes.log" write
|
||||
#for (Idx, 0, 5)
|
||||
#local Angle = Idx* 1.07825;
|
||||
#local Px = sin(Angle) * (SzSol * 1.21);
|
||||
#local Pz = cos(Angle) * (SzSol * 1.21);
|
||||
#declare UnderHoles[Idx] = <Px, 0, Pz>;
|
||||
#write (Holes, Idx, " ", Angle, " ", UnderHoles[Idx], "\n")
|
||||
#end
|
||||
#fclose Holes
|
||||
|
||||
#declare Underground = object
|
||||
{
|
||||
difference {
|
||||
// plane { y, 0 }
|
||||
#local Big = 300;
|
||||
box { <-Big, -0.01, -Big>, < Big, 0.01, Big> }
|
||||
box { <-Big, -0.10, -Big>, < Big, 0.01, Big> }
|
||||
#undef Big
|
||||
#local W = SzSol * 1.204;
|
||||
cylinder { <-W, -1, -W>, <-W, 1, -W>, 5 }
|
||||
cylinder { <-W, -1, W>, <-W, 1, W>, 7 }
|
||||
cylinder { < W, -1, W>, < W, 1, W>, 9 }
|
||||
#undef W
|
||||
#for (Foo, 0, 5)
|
||||
cylinder { -y*5, y*5, 4 translate UnderHoles[Foo] }
|
||||
#end
|
||||
}
|
||||
texture {
|
||||
pigment { color Gray20 }
|
||||
normal { bumps 0.38 scale 3 }
|
||||
finish { phong 0.125 }
|
||||
}
|
||||
rotate y*35
|
||||
translate -y*2.55
|
||||
// translate -y*1.55
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
|
@ -13,14 +13,11 @@
|
||||
|
||||
// =======================================================
|
||||
|
||||
// #debug concat("------ cutoff clock = ", str(clock,5,0),"\n")
|
||||
|
||||
|
||||
#declare Kbox = (2.03*NormClock);
|
||||
difference {
|
||||
object { HexaCone () }
|
||||
box { -1, 1 translate z*Kbox }
|
||||
translate y*1.5
|
||||
translate y*2.5
|
||||
}
|
||||
|
||||
/* this one is for debugging */
|
||||
@ -33,11 +30,11 @@ object { Le_Decor }
|
||||
|
||||
// =======================================================
|
||||
|
||||
#local CamX = -2.7 + (1.4*Cos_01(NormClock));
|
||||
#local CamX = -2.7 + (1.8*Cos_01(NormClock));
|
||||
#local CamY = 2.58 + (0.034*sqrt(NormClock));
|
||||
#local CamZ = 5.35;
|
||||
camera {
|
||||
location <CamX, CamY, CamZ>
|
||||
look_at <0, 1.6, 0>
|
||||
look_at <0, 2.6, 0>
|
||||
angle 39 - 5*Cos_01(NormClock)
|
||||
}
|
||||
|
50
dynamic.inc
50
dynamic.inc
@ -1,10 +1,43 @@
|
||||
/*
|
||||
*/
|
||||
|
||||
object { Les_Bibelots rotate y*clock translate <28, -1, -32> }
|
||||
|
||||
/*
|
||||
* on fait passer un hexatruc dans le ciel
|
||||
*/
|
||||
#declare A = <-SzSol, 22, -10>;
|
||||
#declare B = < SzSol+4, 18, -11>;
|
||||
#declare P = Interpolate(A, B, NormClock);
|
||||
object { HexaCone () rotate y*((12*NormClock)+80) translate P }
|
||||
|
||||
|
||||
#declare HC_A = <0.03, 1.18, 0.17>;
|
||||
#declare HC_B = <2.0, 5.0, 9.0>;
|
||||
/*
|
||||
* le vaisseau "trident" passe a travers les
|
||||
* trous de l'underground
|
||||
*/
|
||||
|
||||
#declare Truc = object
|
||||
{
|
||||
cylinder { -y, y, 0.8 }
|
||||
pigment { color Red }
|
||||
}
|
||||
|
||||
#fopen Trid "WS/tridents.log" write
|
||||
#for (Foo, 0, 5)
|
||||
#declare Dy = -3+(11*NormClock);
|
||||
#declare Tr = UnderHoles[Foo] + <0, Dy, 0>;
|
||||
#write (Trid, Foo, " ", NormClock, " ", Dy, " ",
|
||||
UnderHoles[Foo], " ", Tr, "\n")
|
||||
object { Trident_A () translate Tr }
|
||||
#end
|
||||
#fclose Trid
|
||||
|
||||
/*
|
||||
* echange hexacone et hexabenz
|
||||
*/
|
||||
#declare HC_A = <0.03, 2.18, 0.17>;
|
||||
#declare HC_B = <3.00, 11.07, 11.09>;
|
||||
#declare HC_P = Interpolate(HC_A, HC_B, Cos_01(NormClock));
|
||||
#declare RX = -9+(NormClock*11);
|
||||
#declare RY = 122 * (exp(NormClock) - 1.0);
|
||||
@ -12,19 +45,18 @@ object { HexaCone ()
|
||||
rotate <RX, RY, -4>
|
||||
translate HC_P
|
||||
}
|
||||
|
||||
#declare HB_A = <-4.0, 7.0, 5.0>;
|
||||
#declare HB_B = <0.03, 1.22, 0.17>;
|
||||
#declare HB_A = <-5.00, 10.0, 6.33>;
|
||||
#declare HB_B = < 0.03, 2.32, -0.37>;
|
||||
#declare HB_P = Interpolate(HB_A, HB_B, Cos_01(NormClock));
|
||||
#declare RY = -75 * (exp(NormClock*2) - 1.0);
|
||||
#declare RY = -75 * (exp(NormClock*1.8) - 1.0);
|
||||
#declare RZ = -7+(7*NormClock);
|
||||
object { HexaBenz ()
|
||||
rotate <6, RY, RZ> translate HB_P }
|
||||
|
||||
/*
|
||||
* nouveau 11 fevrier 2025
|
||||
* passage d'un hexawood près de la base
|
||||
*/
|
||||
#declare A = <-21, -1.9, (SzSol/2)+8>;
|
||||
#declare B = < 24, -2.4, (SzSol/2)+5>;
|
||||
#declare A = <-21, 1.1, (SzSol/2)+8>;
|
||||
#declare B = < 24, 1.1, (SzSol/2)+5>;
|
||||
#declare P = Interpolate(A, B, NormClock);
|
||||
object { HexaWood translate P }
|
||||
|
@ -11,35 +11,48 @@
|
||||
#include "contexte.inc"
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
// =======================================================
|
||||
|
||||
#for (idX, 0, 5)
|
||||
#for (idZ, 0, 5)
|
||||
#include "dynamic.inc"
|
||||
|
||||
#local posX = (idX * 4.72) - 11.6 + (rand(Rng1)-0.5);
|
||||
#for (idX, -3, 3)
|
||||
#for (idZ, -3, 3)
|
||||
|
||||
#local posX = (idX * 4.72) + (rand(Rng1)-0.5);
|
||||
#local posY = 3.1 + (1.2*(rand(Rng1)-0.5));
|
||||
#local posZ = (idZ * 4.37) - 7.9;
|
||||
#local posZ = (idZ * 4.37) ;
|
||||
#local Rx = (rand(Rng1) - 0.5) * 8;
|
||||
#local Ry = (rand(Rng1) - 0.5) * 14;
|
||||
#local Rz = (rand(Rng1) - 0.5) * 11;
|
||||
#if (rand(Rng1) < 0.515)
|
||||
object { HexaCone ()
|
||||
rotate <Rx, Ry, Rz>
|
||||
|
||||
// #debug concat("X ", str(posX,7,3), " Z ", str(posZ,7,3), "\n")
|
||||
// #debug concat("position Z ", str(posZ,7,3),"\n")
|
||||
|
||||
#if ( (abs(posX)>1) & (abs(posZ)>0.5) )
|
||||
|
||||
#if (rand(Rng1) < 0.555)
|
||||
object { HexaCone () rotate <Rx, Ry, Rz>
|
||||
translate <posX, posY, posZ> }
|
||||
#else
|
||||
object { HexaBenz ()
|
||||
rotate <Rx, Ry, Rz>
|
||||
object { HexaBenz () rotate <Rx, Ry, Rz>
|
||||
translate <posX, posY, posZ> }
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
// #debug "\n"
|
||||
|
||||
|
||||
#end // if pos...
|
||||
#end // loop IDX
|
||||
#end //loop idZ
|
||||
|
||||
// =======================================================
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
// object { Repere scale 5 translate y }
|
||||
// object { Repere scale 5 translate y }
|
||||
|
||||
#local CamX = -8.7 + (6.6*Cos_01(NormClock));
|
||||
#local CamY = 2.95 + (18.64*Cos_01(NormClock));
|
||||
@ -48,5 +61,5 @@ object { Le_Decor }
|
||||
camera {
|
||||
location <CamX, CamY, CamZ>
|
||||
look_at <0.0, -NormClock, 0>
|
||||
angle 60 - (3.97 * NormClock)
|
||||
angle 64 - (3.97 * NormClock)
|
||||
}
|
||||
|
38
essai.pov
38
essai.pov
@ -15,41 +15,37 @@
|
||||
|
||||
// =======================================================
|
||||
|
||||
#include "dynamic.inc"
|
||||
// #include "dynamic.inc"
|
||||
|
||||
// =======================================================
|
||||
|
||||
// object { OpenBox translate y*1.30 }
|
||||
#if (0)
|
||||
#local RX = -11 + (10*sin(NormClock*9.81) + 3*sin(NormClock*23));
|
||||
#local RZ = 26 - (14*Cos_010(NormClock));
|
||||
object { HexaWood rotate <RX, 37, RZ> translate <9, 2.777, -11> }
|
||||
#include "trident.inc"
|
||||
|
||||
|
||||
#if (1)
|
||||
#local RX = -11 + (80*sin(NormClock*9.81) + 3*sin(NormClock*23));
|
||||
#local RZ = 96 - (54*Cos_010(NormClock));
|
||||
object { Trident_A () rotate <RX, 0, RZ> translate < -1.5, 0, 0> }
|
||||
object { Trident_A () rotate <RZ, 0, RX> translate < 1.5, 0, 0> }
|
||||
#end
|
||||
|
||||
|
||||
/*
|
||||
#declare A = <-21, -0.9, SzSol+9>;
|
||||
#declare B = < 33, -0.7, SzSol+7>;
|
||||
#declare P = Interpolate(A, B, NormClock);
|
||||
object { HexaWood translate P }
|
||||
*/
|
||||
|
||||
object { Repere scale 10 translate y*6 }
|
||||
object { Le_Decor }
|
||||
object { Repere }
|
||||
//.object { Le_Decor }
|
||||
|
||||
// =======================================================
|
||||
|
||||
#local CamX = -2.7 + (2.8*Cos_010(NormClock));
|
||||
#local CamY = 0.81 + (3*exp(NormClock));
|
||||
#local CamZ = 7.777 - (0.8*Cos_010(NormClock));
|
||||
#local CamY = 0.21 + (2.3*exp(NormClock));
|
||||
#local CamZ = 5.777 - (0.8*Cos_010(NormClock));
|
||||
|
||||
#local K = 8;
|
||||
#local K = 3.4;
|
||||
#local CamX = CamX * K;
|
||||
#local CamY = CamY * K * 2;
|
||||
#local CamY = CamY * K;
|
||||
#local CamZ = CamZ * K;
|
||||
|
||||
camera {
|
||||
location <CamX, CamY, CamZ>
|
||||
look_at <0, 0.98, 0>
|
||||
angle 32 - 5*Cos_01(NormClock)
|
||||
look_at <0, 0, 0>
|
||||
angle 20 - 5*Cos_01(NormClock)
|
||||
}
|
||||
|
@ -24,9 +24,10 @@ global_settings {
|
||||
*/
|
||||
|
||||
#declare SzSol = 34;
|
||||
#declare H_sol = 0.500;
|
||||
|
||||
#declare SzBase = 2.85;
|
||||
#declare H_base = 0.10;
|
||||
#declare SzBase = 2.90;
|
||||
#declare H_base = 0.50;
|
||||
|
||||
#declare R_basecone = 0.117;
|
||||
#declare H_cone = 0.97;
|
||||
|
@ -9,7 +9,8 @@ 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.58, 3.03> translate -0.02*y }
|
||||
sphere { 0, RA*1.098 scale <1, 0.58, 3.03>
|
||||
translate -0.02*y }
|
||||
}
|
||||
// }
|
||||
#end
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
|
||||
#local K = 1.48;
|
||||
object { HexaBenz () rotate y*90 translate <-K, 1.85, 0> }
|
||||
object { HexaBenz () translate < K, 1.67, 0> }
|
||||
object { HexaBenz () rotate y*90 translate <-K, 2.85, 0> }
|
||||
object { HexaBenz () translate < K, 2.67, 0> }
|
||||
|
||||
// =======================================================
|
||||
|
||||
|
@ -9,10 +9,11 @@
|
||||
#include "contexte.inc"
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
// #include "trident.inc"
|
||||
|
||||
#local K = 1.48;
|
||||
object { HexaCone () rotate y*90 translate <-K, 1.7, 1> }
|
||||
object { HexaCone () translate < K, 1.6, 1> }
|
||||
object { HexaCone () rotate y*90 translate <-K, 2.7, 1> }
|
||||
object { HexaCone () translate < K, 2.6, 1> }
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
@ -18,10 +19,10 @@
|
||||
|
||||
#declare PosX = 2.95;
|
||||
#declare PosY = 2.60 + (NormClock*0.28);
|
||||
#declare PosZ = (NormClock-0.5) * 53.27;
|
||||
#declare PosZ = (NormClock-0.5) * 41.27;
|
||||
object { HexaCone () translate <PosX, PosY, PosZ> }
|
||||
|
||||
object { HexaCone () translate <PosX+2.96, PosY+1.72, PosZ-11.5> }
|
||||
object { HexaCone () translate <PosX+2.96, PosY+1.82, PosZ-15.5> }
|
||||
object { HexaBenz () translate <PosX-1.96, PosY+2.42, PosZ-17.5> }
|
||||
|
||||
object { Le_Decor }
|
||||
@ -40,7 +41,7 @@ light_source {
|
||||
|
||||
#if ( (clock > 230) & (clock < 300) )
|
||||
light_source {
|
||||
<2, 0.30, -2> color White
|
||||
<2, 0.30, -2> color Green
|
||||
spotlight
|
||||
radius .044
|
||||
falloff 2
|
||||
@ -50,7 +51,7 @@ light_source {
|
||||
#end
|
||||
|
||||
camera {
|
||||
location <-2.76, 1.03, 9.76>
|
||||
location <-2.76, 1.03, 8.76>
|
||||
look_at <PosX+0.08, PosY, PosZ>
|
||||
// focal_point <0, 1, 0>
|
||||
// aperture 0.046
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
#declare A = <-SzSol, 16, -8>;
|
||||
#declare B = <SzSol+4, 18, -11>;
|
||||
@ -34,7 +35,7 @@ object { Le_Decor }
|
||||
|
||||
// object { Repere scale 3 translate <SzSol, 2, SzSol> }
|
||||
|
||||
#local DistCam = 239;
|
||||
#local DistCam = 280;
|
||||
#local CK = 0.56 + (0.72 * NormClock);
|
||||
#declare CamX = DistCam * sin(CK);
|
||||
#declare CamY = 28;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
#include "dynamic.inc"
|
||||
|
||||
@ -18,7 +19,7 @@
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
#declare CK = 96 + (clock * 0.36);
|
||||
#declare CK = 144 + (clock * 0.36);
|
||||
#declare Dcam = 3.55;
|
||||
#declare CamX = Dcam * sin(radians(CK));
|
||||
#declare CamZ = Dcam * 1.20 * cos(radians(CK));
|
||||
|
20
survol.pov
20
survol.pov
@ -11,30 +11,20 @@
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
#include "trident.inc"
|
||||
|
||||
// =======================================================
|
||||
|
||||
/*
|
||||
* on fait passer un hexatruc
|
||||
*/
|
||||
#declare A = <-SzSol, 16, 9>;
|
||||
#declare B = < SzSol+4, 18, 11>;
|
||||
#declare P = Interpolate(A, B, NormClock);
|
||||
object { HexaCone () rotate y*((12*NormClock)+80) translate P }
|
||||
|
||||
|
||||
#include "dynamic.inc"
|
||||
|
||||
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
// object { Repere translate y*2 }
|
||||
object { Repere scale 2 translate y*2 }
|
||||
|
||||
// =======================================================
|
||||
|
||||
#declare Debut = <-3, 57, 47> ;
|
||||
#declare Fin = < 2, 53, 7> ;
|
||||
#declare Debut = <-3, 87, 47> ;
|
||||
#declare Fin = < 2, 99, 7> ;
|
||||
#declare Pos = Cos_01(NormClock);
|
||||
#declare PosCam = Interpolate(Debut, Fin, Pos);
|
||||
|
||||
@ -43,6 +33,6 @@ object { Le_Decor }
|
||||
camera {
|
||||
location PosCam
|
||||
look_at LatCam
|
||||
angle 54
|
||||
angle 58
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
#include "hexawood.inc"
|
||||
|
||||
#include "trident.inc"
|
||||
|
||||
/* XXX
|
||||
#declare TrX = 1.84 * sqrt(NormClock);
|
||||
|
61
trident.inc
61
trident.inc
@ -1,10 +1,63 @@
|
||||
|
||||
#declare Trid_length = 2;
|
||||
|
||||
// ------------------------------------------------------
|
||||
#declare Trid_cone = object
|
||||
{
|
||||
cone { 0, R_basecone, y*0.89, 0.0001 }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
|
||||
#macro Trid_A_cone ()
|
||||
difference {
|
||||
object { Trid_cone }
|
||||
object { Trid_cone }
|
||||
#local Foo = rand(Rng1);
|
||||
#if (Foo < 0.333)
|
||||
pigment { color Red }
|
||||
#elseif (Foo < 0.666)
|
||||
pigment { color Green }
|
||||
#else
|
||||
pigment { color Blue }
|
||||
#end // else
|
||||
#undef Foo
|
||||
}
|
||||
#end // macro
|
||||
// ------------------------------------------------------
|
||||
#macro Trid_A_head ()
|
||||
union {
|
||||
#for (A, 0, 360, 120)
|
||||
#local E = 0.44;
|
||||
#local Tx = E * sin(radians(A));
|
||||
#local Ty = 0;
|
||||
#local Tz = E * cos(radians(A));
|
||||
object { Trid_A_cone () translate <Tx, Ty, Tz> }
|
||||
#undef Tx
|
||||
#undef Ty
|
||||
#undef Tz
|
||||
#end // for
|
||||
}
|
||||
#end
|
||||
// ------------------------------------------------------
|
||||
#declare Trid_A_body = object
|
||||
{
|
||||
#local L = Trid_length / 2;
|
||||
merge {
|
||||
cylinder { <0, -L, 0>, <0, L, 0>, 0.065 }
|
||||
sphere { 0, 0.065 scale <1, 4, 1> translate y*L }
|
||||
texture { WIP_color }
|
||||
}
|
||||
#undef L
|
||||
}
|
||||
// ------------------------------------------------------
|
||||
// ------------------------------------------------------
|
||||
#macro Trident_A ()
|
||||
union {
|
||||
object { Trid_A_head () translate y*0.95 }
|
||||
object { Trid_A_body }
|
||||
// object { Trid_A_tail }
|
||||
}
|
||||
#end
|
||||
// ------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user