diff --git a/README.md b/README.md index 5e7ff5a..eb39932 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,15 @@ et vous pouvez suivre son évolution par l'intermédiaire de [Mastodon](https://mastodon.tetaneutral.net/@tth) avec le croisimot `#hexacone`. -Quelques images sont disponibles sur mon serveur -de [cuisine](http://maison.tth.netlib.re/p/hexacone.html). +Quelques images sont disponibles sur mon serveur de +[cuisine](http://maison.tth.netlib.re/pov/hexacone.html). ## Prérequis Avant toute chose, il faut avoir installé les logiciels suivants : bash, awk, gnuplot, imagemagick, et, bien entendu, [povray](https://povray.org/). +Une bonne maitrise des scripts shell sera un plus. ## Utilisation @@ -26,8 +27,8 @@ par un classique [`Makefile`](./Makefile) et les séquences animées produites par un [script shell](./mkloop.sh). Avant toute chose, vous devrez vérifier la présence de plusieurs -répertoires : d'un coté `./frames/` pour stocker les images calculées : - +répertoires : d'un coté `./frames/` pour stocker les images calculées et `./frames/Spool` pour l'assemblage +de la vidéo intégrale : ``` frames/ @@ -41,6 +42,8 @@ répertoires : d'un coté `./frames/` pour stocker les images calculées : ``` et de l'autre coté `./WS/` pour ranger les fichiers de travail. +À vous de jouer maintenant. + ## Contact * La [mailing-list du tetalab](https://lists.tetalab.org/postorius/lists/tetalab.tetalab.org/) ; diff --git a/contexte.inc b/contexte.inc index d9f98fa..bf0d787 100644 --- a/contexte.inc +++ b/contexte.inc @@ -8,8 +8,34 @@ #include "groundbase.inc" +/* ======================================================= */ +/* + * essai du 12 mars 2025 + */ +#declare RedB_0_X = 18; +#declare RedB_0_Z = 28; +#declare RedB_1_X = -24; +#declare RedB_1_Z = 4; + +#declare Pos_RedB_0 = ; +#declare Pos_RedB_1 = ; + +#macro RedBase_0 ( T ) +difference { +#local R = 2.46; + cylinder { 0, y*0.40, R } + cone { y*0.37, R*0.78, y*0.42, R*0.83 } + #for (Foo, 20, 339, 10) + #local Dx = R * sin(radians(Foo)); + #local Dz = R * cos(radians(Foo)); + cone { 0, 0.01, y*0.41, 0.10 translate } + #end + } +// pigment { color Red*0.8 } +texture { T } +#end // macro /* ======================================================= */ @@ -34,7 +60,7 @@ union { difference { cylinder { 0, y*H_gylampe, R_gyro } cylinder { y*0.01, y*(H_gylampe-0.01), R_gyro*0.97 } - #local WB = 0.015; + #local WB = 0.017; box { <-1, 0.03, -WB>, <1, (H_gylampe-0.03), WB> } box { <-WB, 0.03, -1>, } #undef WB @@ -65,15 +91,13 @@ union { #macro Les_GyroPhares () union { - #local E = SzSol * 0.488; - object { GyroPhare () translate <-E, 0, -E> } - object { GyroPhare () translate < E, 0, -E> } - object { GyroPhare () translate <-E, 0, E> } - object { GyroPhare () translate < E, 0, E> } - object { GyroPhare () translate <-E, 0, 0> } - object { GyroPhare () translate < E, 0, 0> } - object { GyroPhare () translate < 0, 0, -E> } - object { GyroPhare () translate < 0, 0, E> } + #local E = SzSol * 0.431; + #for (Idx, 0, 360, 60) + #local Ang = radians(Idx+7.33); + #local Dx = E * sin(Ang); + #local Dz = E * cos(Ang); + object { GyroPhare () translate } + #end #undef E } #end @@ -136,16 +160,15 @@ blob { /* ======================================================= */ - /* ======================================================= */ #declare UnderHoles = array[6] #fopen Holes "WS/holes.log" write #for (Idx, 0, 5) - #local Angle = Idx* 1.07825; + #local Angle = Idx* 1.090; #local Px = sin(Angle) * (SzSol * 1.21); - #local Pz = cos(Angle) * (SzSol * 1.21); + #local Pz = cos(Angle) * (SzSol * 1.23); #declare UnderHoles[Idx] = ; #write (Holes, Idx, " ", Angle, " ", UnderHoles[Idx], "\n") #end @@ -156,15 +179,15 @@ blob { difference { // plane { y, 0 } #local Big = 300; - box { <-Big, -0.10, -Big>, < Big, 0.01, Big> } + box { <-Big, -0.15, -Big>, < Big, 0.0000, Big> } #undef Big #for (Foo, 0, 5) - cylinder { -y*5, y*5, 4 translate UnderHoles[Foo] } + cylinder { -y*5, y*5, 3.4 translate UnderHoles[Foo] } #end } texture { pigment { color Gray20 } - normal { bumps 0.38 scale 3 } + normal { bumps 0.38 scale 2.6 } finish { phong 0.125 } } // translate -y*1.55 @@ -292,7 +315,7 @@ sky_sphere { [ 1.0 color Gray10 ] } turbulence 3.14159 + 0.74 * Cos_010(NormClock) - scale 1.620 + scale 1.600 // translate -1 } #local Kem = 0.09; @@ -318,7 +341,8 @@ sky_sphere { union { object { Underground } object { La_GroundBase } - // object { Les_Bibelots } + object { RedBase_0 (T_Beton_1) translate } + object { RedBase_0 (T_Beton_2) translate } // object { Les_Lumieres } object { QuadriLight } object { Les_GyroPhares () } diff --git a/cutoff.pov b/cutoff.pov index 896256a..dc69663 100644 --- a/cutoff.pov +++ b/cutoff.pov @@ -10,6 +10,10 @@ #include "contexte.inc" #include "hexacone.inc" #include "hexabenz.inc" +#include "hexawood.inc" +#include "trident.inc" + +#include "dynamic.inc" // ======================================================= @@ -17,24 +21,26 @@ difference { object { HexaCone () } box { -1, 1 translate z*Kbox } - translate y*2.5 + translate y*1.5 + Pos_RedB_1 } +object { Repere translate y*1.5 + Pos_RedB_1 } + /* this one is for debugging */ // object { OpenBox translate <0, 1.5, Kbox> } // ======================================================= object { Le_Decor } -// object { Repere } // ======================================================= -#local CamX = -2.7 + (1.8*Cos_01(NormClock)); -#local CamY = 2.58 + (0.034*sqrt(NormClock)); -#local CamZ = 5.35; +#local CamX = -33.4 + (2.83*Cos_01(NormClock)); +#local CamY = 2.5 + (0.24*sqrt(NormClock)); +#local CamZ = 5.85 + (2.42*NormClock); + camera { location - look_at <0, 2.6, 0> + look_at <0, 1.5, 0> + Pos_RedB_1 angle 39 - 5*Cos_01(NormClock) } diff --git a/dynamic.inc b/dynamic.inc index 1327bd1..b550528 100644 --- a/dynamic.inc +++ b/dynamic.inc @@ -1,7 +1,7 @@ /* */ -object { Les_Bibelots rotate y*clock translate <28, -1, -32> } +object { Les_Bibelots rotate y*clock translate <28, -1, -27> } /* * on fait passer un hexatruc dans le ciel @@ -56,7 +56,7 @@ object { HexaBenz () /* * passage d'un hexawood près de la base */ -#declare A = <-21, 1.1, (SzSol/2)+8>; -#declare B = < 24, 1.1, (SzSol/2)+5>; +#declare A = <-21, 1.7, (SzSol/2)+8>; +#declare B = < 24, 1.6, (SzSol/2)+5>; #declare P = Interpolate(A, B, NormClock); object { HexaWood translate P } diff --git a/essai.pov b/essai.pov index 8c7bdfa..1d0010a 100644 --- a/essai.pov +++ b/essai.pov @@ -7,6 +7,8 @@ #include "globals.inc" +#debug "\n GLOBALS INCLUDED\n" + #include "contexte.inc" #include "gadgets.inc" #include "hexacone.inc" @@ -16,36 +18,36 @@ // ======================================================= // #include "dynamic.inc" - +/* ======================================================= */ // ======================================================= #include "trident.inc" +#debug "\n ACTION !!!\n" #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 translate < -1.5, 0, 0> } -object { Trident_A () rotate translate < 1.5, 0, 0> } +object { Trident_A () rotate translate < -1.4, 3, 0> } +object { Trident_A () rotate <0, clock, 0> translate < 1.4, 1, 0> } #end - -object { Repere } -//.object { Le_Decor } +object { Repere translate y*0.6 } +object { RedBase_0 (T_Grnt27) } // ======================================================= -#local CamX = -2.7 + (2.8*Cos_010(NormClock)); -#local CamY = 0.21 + (2.3*exp(NormClock)); -#local CamZ = 5.777 - (0.8*Cos_010(NormClock)); +#local CamX = -2.7 + (2.8*Cos_010(NormClock)); +#local CamY = -0.91 + (2.3*exp(NormClock)); +#local CamZ = 5.777 - (0.8*Cos_010(NormClock)); -#local K = 3.4; +#local K = 4.7; #local CamX = CamX * K; #local CamY = CamY * K; #local CamZ = CamZ * K; camera { location - look_at <0, 0, 0> - angle 20 - 5*Cos_01(NormClock) + look_at <0, 1.4, 0> + angle 20 - 3*Cos_01(NormClock) } diff --git a/globals.inc b/globals.inc index dc29f2d..297528c 100644 --- a/globals.inc +++ b/globals.inc @@ -11,7 +11,7 @@ global_settings { #include "stones.inc" #include "woods.inc" -#declare Rng1 = seed(1664); +#declare Rng1 = seed(1789); #declare foo = rand(Rng1); #declare Rng2 = seed(now*24*60*60); #declare bar = rand(Rng2); @@ -24,10 +24,10 @@ global_settings { */ #declare SzSol = 34; -#declare H_sol = 0.100; +#declare H_sol = 0.000; // c'est quoi exactement ? #declare SzBase = 2.90; -#declare H_base = 0.50; +#declare H_base = 0.23; #declare R_basecone = 0.117; #declare H_cone = 0.97; @@ -36,7 +36,7 @@ global_settings { #declare H_gyro = 2.10; #declare H_gylampe = 0.25; -#declare H_QuadriLight = 36; +#declare H_QuadriLight = 34; #declare E_QuadriLight = SzSol * 1.35; /* ------------------------------------------------------------ */ @@ -53,7 +53,7 @@ finish { phong 0.01 } #declare T_WIP_alert = texture { pigment { color Red } -finish { specular 0.90 } +finish { ambient 1 specular 0.90 } } #declare T_Planete_A = texture @@ -69,22 +69,39 @@ finish { metallic 0.50 reflection 0.55 } } /* - * deux textures + * deux textures pour faire des batiments */ #declare T_Beton_1 = texture { -pigment { color <0.9, 0.8, 0.8> } +pigment { color <0.9, 0.8, 0.7> } normal { dents 0.75 scale 0.3 } finish { roughness 1.00 } } #declare T_Beton_2 = texture { -pigment { color <0.7, 0.6, 0.6> } +pigment { color <0.7, 0.6, 0.5> } normal { dents 0.25 scale 2 } finish { roughness 1.00 } } + +#declare Flashy = texture { +pigment { + onion + colour_map { + [0.00, Red ] + [0.40, Gray50 ] + [1.00, Blue ] + } + turbulence 3.14159 + scale 0.50 + } +finish { + emission 0 ambient 1 diffuse 0 specular 0 + } +} + /* ------------------------------------------------------------ */ /* * Usefull macros diff --git a/groundbase.inc b/groundbase.inc index f5eb629..9acc265 100644 --- a/groundbase.inc +++ b/groundbase.inc @@ -46,13 +46,14 @@ intersection { height_field { png "datas/hf.png" smooth translate <-.5, 0, -.5> - scale + #local SC = SzSol * 1.130; + scale texture { pigment { image_map { png "datas/cmap.png" } rotate x*90 translate <-.5, 0, -.5> - scale + scale } } } @@ -65,6 +66,9 @@ translate y*H_sol /* ======================================================= */ #declare GroundBase_a = object { +/* + C'est quoi ce truc ? + */ union { #local Dx = 1.5; #local Dz = 1.0; @@ -92,18 +96,20 @@ merge { } } -#declare GroundBase_b = object +#declare GroundBase_estrade = object { #local Sz = SzBase - 0.14; +#local Hc = H_base; union { box { <-SzBase, 0, -SzBase>, } - object { GroudBase_coin translate <-Sz, 0, -Sz> } - object { GroudBase_coin translate < Sz, 0, -Sz> } - object { GroudBase_coin translate <-Sz, 0, Sz> } - object { GroudBase_coin translate < Sz, 0, Sz> } + object { GroudBase_coin translate <-Sz, Hc, -Sz> } + object { GroudBase_coin translate < Sz, Hc, -Sz> } + object { GroudBase_coin translate <-Sz, Hc, Sz> } + object { GroudBase_coin translate < Sz, Hc, Sz> } } texture { T_Grnt27 rotate 9 scale 0.32 } #undef Sz +#undef Hc } /* ------------------------------------------------------------ */ @@ -112,13 +118,14 @@ texture { T_Grnt27 rotate 9 scale 0.32 } { union { object { GroundBase_Sol } - object { GroundBase_b translate y*H_sol } + object { GroundBase_estrade translate y*H_sol } /* * ici, mettre la cabane */ #local Dz = <0, 0, -7>; - // object { GroundBase_a translate Dz } + object { GroundBase_a translate Dz } object { Cabane_Base_2 rotate y*180 translate Dz } + #undef Dz } translate y*(H_sol+H_base) } diff --git a/hexabenz.pov b/hexabenz.pov index a6c2ab4..019c5a6 100644 --- a/hexabenz.pov +++ b/hexabenz.pov @@ -9,11 +9,21 @@ #include "contexte.inc" #include "hexacone.inc" #include "hexabenz.inc" +#include "hexawood.inc" +#include "trident.inc" +#include "dynamic.inc" -#local K = 1.48; -object { HexaBenz () rotate y*90 translate <-K, 2.85, 0> } -object { HexaBenz () translate < K, 2.67, 0> } +#declare BiBenz = object +{ +#local K = 1.41; +union { + object { HexaBenz () rotate y*90 translate <-K, 1.75, 0> } + object { HexaBenz () translate < K, 1.71, 0> } + } +} + +object { BiBenz translate Pos_RedB_0 } // ======================================================= @@ -22,12 +32,14 @@ object { Le_Decor } // object { Repere scale 2 } +#declare Loc_cam = <0, 2, 1> + (Pos_RedB_0 * 1.33333); + camera { - location <-3.9+(11*NormClock), 1.90, 7.59-NormClock> - look_at <0.17, 1.47, 0> + location Loc_cam + look_at Pos_RedB_0 + <0, 1, 0> // focal_point <0.37, 0.0, 0> // aperture 0.046 // blur_samples 30 - angle 60 - 28 * Cos_01(NormClock) + angle 40 - 15 * Cos_01(NormClock) } diff --git a/hexacone.pov b/hexacone.pov index a496c3a..6387221 100644 --- a/hexacone.pov +++ b/hexacone.pov @@ -9,11 +9,21 @@ #include "contexte.inc" #include "hexacone.inc" #include "hexabenz.inc" -// #include "trident.inc" +#include "hexawood.inc" +#include "trident.inc" -#local K = 1.48; -object { HexaCone () rotate y*90 translate <-K, 2.7, 1> } -object { HexaCone () translate < K, 2.6, 1> } +#include "dynamic.inc" + +#declare BiCone = object +{ +#local K = 1.27; +union { + object { HexaCone () rotate y*90 translate <-K, 1.7, 1> } + object { HexaCone () translate < K, 1.9, 1> } + } +} + +object { BiCone translate Pos_RedB_0 } object { Le_Decor } @@ -24,10 +34,11 @@ object { Le_Decor } // object { Repere scale 2 } +#declare Loc_cam = <2, 2, -1> + (Pos_RedB_0 * 1.263); + camera { - location - <-1.9+(8*NormClock), 0.70+NormClock, 7.59-NormClock> - look_at <0.07, 1.55, 0> + location Loc_cam + look_at Pos_RedB_0 + <0.12, 1.10, 0> // focal_point <0.37, 0.90, 0> // aperture 0.046 // blur_samples 30 diff --git a/orbite.pov b/orbite.pov index 102b7d4..3167790 100644 --- a/orbite.pov +++ b/orbite.pov @@ -59,13 +59,13 @@ union { #declare PosY = 0; #declare PosZ = RO * cos(CK); object { HexaBenz () - rotate -y*CK*42.3 translate + rotate -y*CK*62.3 translate } #declare PosX = RO * sin(CK+2.12); #declare PosY = 0; #declare PosZ = RO * cos(CK+2.23); object { HexaCone () - rotate y*CK*49.22 translate + rotate y*CK*79.22 translate } object { Planete rotate (-clock*0.21)*y } diff --git a/passage.pov b/passage.pov index 34a21c6..eb7461f 100644 --- a/passage.pov +++ b/passage.pov @@ -17,9 +17,9 @@ #include "dynamic.inc" -#declare PosX = 2.95; +#declare PosX = 3.95; #declare PosY = 2.60 + (NormClock*0.28); -#declare PosZ = (NormClock-0.5) * 41.27; +#declare PosZ = (NormClock-0.5) * 44.27; object { HexaCone () translate } object { HexaCone () translate } diff --git a/scene.pov b/scene.pov index 7a622ef..96eed68 100644 --- a/scene.pov +++ b/scene.pov @@ -19,14 +19,14 @@ object { Le_Decor } -#declare CK = 144 + (clock * 0.36); -#declare Dcam = 3.65; +#declare CK = 144 + (clock * 0.27); +#declare Dcam = 3.95; #declare CamX = Dcam * sin(radians(CK)); #declare CamZ = Dcam * 1.20 * cos(radians(CK)); -#declare Lat = <0.03, 1.48, 0.17>; +#declare Lat = <0.03, 1.58, 0.17>; camera { - location + location look_at Lat // focal_point Lat // aperture 0.046 diff --git a/survol.pov b/survol.pov index ea2b9dc..b6f1809 100644 --- a/survol.pov +++ b/survol.pov @@ -24,7 +24,7 @@ object { Repere scale 2 translate y*2 } // ======================================================= #declare Debut = <-3, 87, 47> ; -#declare Fin = < 2, 99, 7> ; +#declare Fin = < 2, 91, 7> ; #declare Pos = Cos_01(NormClock); #declare PosCam = Interpolate(Debut, Fin, Pos); diff --git a/tools/config.sh b/tools/config.sh index 12d6a2d..e59a601 100644 --- a/tools/config.sh +++ b/tools/config.sh @@ -3,7 +3,7 @@ Img_Width=1024 Img_Height=720 -TEXTCOL="PowderBlue" +TEXTCOL="CornflowerBlue" STROKOL="RosyBrown" NBFRAMES=360 diff --git a/topview.pov b/topview.pov index 8f65ced..4a05a60 100644 --- a/topview.pov +++ b/topview.pov @@ -39,8 +39,8 @@ object { HexaWood translate P } object { Le_Decor } -#declare CamY = 31 + (13.37*Cos_01(NormClock)); -#declare LatY = -3 + (1.12*NormClock); +#declare CamY = 31 + (12.34 * Cos_01(NormClock)); +#declare LatY = -3 + ( 1.12 * NormClock); camera { location <-3.60, CamY, 21.09> diff --git a/trident.inc b/trident.inc index b2b2ee1..fdedb7e 100644 --- a/trident.inc +++ b/trident.inc @@ -10,14 +10,16 @@ cone { 0, R_basecone, y*0.89, 0.0001 } #macro Trid_A_cone () difference { object { Trid_cone } - object { Trid_cone } + object { Trid_cone translate -y*0.001 } #local Foo = rand(Rng1); - #if (Foo < 0.333) - pigment { color Red } - #elseif (Foo < 0.666) - pigment { color Green } + #if (Foo < 0.25) + texture { T_Brass_2C } + #elseif (Foo < 0.50) + texture { T_Silver_3A } + #elseif (Foo < 0.75) + texture { T_Chrome_3A } #else - pigment { color Blue } + texture { Flashy } #end // else #undef Foo } @@ -26,35 +28,55 @@ difference { #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 } + #local E = 0.21; + #local Tx = E * sin(radians(A)); + #local Tz = E * cos(radians(A)); + object { Trid_A_cone () translate } + #end // for #undef Tx - #undef Ty #undef Tz + } +#end +// ------------------------------------------------------ +#macro Trid_A_body () +#local L = Trid_length / 2; +merge { + cylinder { <0, -L, 0>, <0, L, 0>, 0.065 } + sphere { 0, 0.065 scale <1, 6, 1> translate y*L } + #if (rand(Rng1) < 0.50) + texture { T_Silver_2C } + #else + texture { T_Copper_1E } + #end + } +#undef L +#end // macro +// ------------------------------------------------------ +#macro Trid_A_ailette () +union { + #local E = 0.46; + object { Trid_A_cone () scale 0.7 translate x*E } + cylinder { 0, x*E, 0.014 + scale <1, 3, 1> texture { T_Silver_3A } } + #undef E + } +#end +// ------------------------------------------------------ +#macro Trid_A_tail () +union { + #for (A, 0, 360, 120) + object { Trid_A_ailette () rotate (A+270)*y } #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 } + object { Trid_A_head () translate y*0.85 } + object { Trid_A_body () } + object { Trid_A_tail () translate -y*0.6 } + // object { Repere translate <0.1, 0, 0.1> } } #end // ------------------------------------------------------