Compare commits

...

26 Commits

Author SHA1 Message Date
Tonton Th
22be42d86e reworking the build system 2025-01-15 22:13:42 +01:00
Tonton Th
6828b25402 this is the eternall wip 2025-01-15 21:34:15 +01:00
Tonton Th
a290042ee9 parameters tweaking 2025-01-15 21:30:44 +01:00
Tonton Th
d8de01a0ae small tuning 2025-01-15 21:30:03 +01:00
Tonton Th
f8f3dcd85e increase phy of blinkenlight 2025-01-15 21:29:11 +01:00
Tonton Th
f8fa077655 tuning prises de vues 2025-01-15 14:01:02 +01:00
Tonton Th
8b3126cd78 moved a constant to globals 2025-01-14 09:06:51 +01:00
Tonton Th
8d438d5885 wip du 2024/01/14 2025-01-14 00:38:40 +01:00
Tonton Th
8c30830837 add global constants 2025-01-13 15:27:56 +01:00
Tonton Th
540dc86601 fine tuning 2025-01-13 15:26:12 +01:00
Tonton Th
6133319acd oups... 2025-01-13 14:47:58 +01:00
Tonton Th
3d779f68c6 cosmetic 2025-01-13 14:47:20 +01:00
Tonton Th
abda4f6896 a new sequence 2025-01-13 14:46:45 +01:00
Tonton Th
afefaa9188 cosmetic 2025-01-12 15:47:46 +01:00
Tonton Th
273312e7c5 gigantic refactoring, part one 2025-01-12 02:33:39 +01:00
Tonton Th
5d34aac50c can now take a sequence name 2025-01-11 20:37:54 +01:00
Tonton Th
936afb01b4 bla 2025-01-11 17:07:50 +01:00
Tonton Th
e62a531a82 + webp 2025-01-11 17:05:13 +01:00
Tonton Th
f06283b570 dependencies 2025-01-08 00:51:03 +01:00
Tonton Th
2ed567a33c use the #macro force, Luke ! 2025-01-08 00:13:37 +01:00
Tonton Th
cb36297499 bla 2025-01-07 14:34:12 +01:00
Tonton Th
afc4fee8a7 tuning... 2025-01-07 14:33:26 +01:00
Tonton Th
a60281b684 + escadrille 2025-01-06 16:07:14 +01:00
Tonton Th
8569be0327 two is better than one 2025-01-06 16:06:26 +01:00
Tonton Th
7b186fad2a et en escadrille ? 2025-01-06 16:05:57 +01:00
Tonton Th
384df739dd clean 2025-01-05 09:09:25 +01:00
21 changed files with 572 additions and 226 deletions

3
.gitignore vendored
View File

@@ -5,6 +5,7 @@ frames/*
datas/*.xcf datas/*.xcf
datas/*.ttf datas/*.ttf
datas/*.jpg datas/*.jpg
datas/*.webp
WS/*timing WS/*timing
WS/log* WS/log*
@@ -12,3 +13,5 @@ WS/log*
*.png *.png
*.gif *.gif
*.mp4 *.mp4
*.pov-state

View File

@@ -1,28 +1,39 @@
DIMS = -W1600 -H1200
POVOPT = +q9 +a0.02 -d POVOPT = +q9 +a0.02 -d
POVDEP = contexte.inc elements.inc \ POVDEP = contexte.inc elements.inc hexabenz.inc \
globals.inc datas/hf.png globals.inc datas/hf.png
CK=180
PNG: essai.png scene.png topview.png passage.png \ PNG: essai.png scene.png topview.png passage.png \
orbite.png orbite.png hexabenz.png escadrille.png \
hexacone.png
topview.png: topview.pov Makefile $(POVDEP) topview.png: topview.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -K359 -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
essai.png: essai.pov Makefile $(POVDEP) essai.png: essai.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
hexabenz.png: hexabenz.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
hexacone.png: hexacone.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
passage.png: passage.pov Makefile $(POVDEP) passage.png: passage.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -K340 -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
orbite.png: orbite.pov Makefile $(POVDEP) orbite.png: orbite.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -K340 -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
CK=175
scene.png: scene.pov Makefile $(POVDEP) scene.png: scene.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 +K${CK} -i$< -o$@ povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
escadrille.png: escadrille.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@

View File

@@ -10,6 +10,12 @@ suivre son évolution par l'intermédiaire de
[Mastodon](https://mastodon.tetaneutral.net/@tth) [Mastodon](https://mastodon.tetaneutral.net/@tth)
avec le croisimot `#hexacone`. avec le croisimot `#hexacone`.
## Prérequis
Avant toute chose, il faut avoir installé les logiciels
suivants : bash, awk, gnuplot, imagemagick, et, bien
entendu, [povray](https://povray.org/).
## Utilisation ## Utilisation
Il y a deux choses que l'on peut tracer : Il y a deux choses que l'on peut tracer :
@@ -26,6 +32,7 @@ répertoires : d'un coté `./frames/<name>` pour stocker les images calculées :
├── essai ├── essai
├── orbite ├── orbite
├── passage ├── passage
├── escadrille
├── scene ├── scene
├── Spool ├── Spool
└── topview └── topview

View File

@@ -29,13 +29,13 @@ union {
object { HexaBalls object { HexaBalls
texture { Lightning1 scale 0.33 } texture { Lightning1 scale 0.33 }
rotate <clock/3, clock/6, clock/9> rotate <clock/3, clock/6, clock/9>
translate <3, -1.6+1.01*Cos_010(NormClock), 5> translate <5, -1.2+1.01*Cos_010(NormClock), 7>
} }
object { HexaBalls object { HexaBalls
texture { Lightning2 scale 0.56 } texture { Lightning2 scale 0.56 }
// rotate <-clock, clock*0.33333, clock> // rotate <-clock, clock*0.33333, clock>
translate <5, -1+0.42*Cos_010(NormClock), -4> translate <7, -1+0.89*Cos_010(NormClock), -6>
} }
} }
} }
@@ -68,10 +68,15 @@ height_field {
png "datas/hf.png" png "datas/hf.png"
smooth smooth
translate <-.5, 0, -.5> translate <-.5, 0, -.5>
scale <21, 0.88, 21> scale <SzSol, 0.98, SzSol>
texture { texture {
pigment { color DarkGreen } pigment {
normal { bumps 0.035 scale 0.186 } // color DarkGreen
image_map { png "datas/cmap.png" }
translate <-.5, 0, -.5>
scale <SzSol, 0.98, SzSol>
}
// normal { bumps 0.035 scale 0.186 }
finish { phong 0.125 } finish { phong 0.125 }
} }
} }
@@ -80,8 +85,8 @@ height_field {
#declare Repere = object #declare Repere = object
{ {
union { union {
cylinder { 0, <1, 0, 0>, 0.007 pigment { color Red } } cylinder { 0, <1, 0, 0>, 0.008 pigment { color Red } }
cylinder { 0, <0, 0, 1>, 0.007 pigment { color Blue } } cylinder { 0, <0, 0, 1>, 0.008 pigment { color Blue } }
} }
} }
@@ -90,7 +95,7 @@ union {
union { union {
#if (1) #if (1)
light_source { light_source {
<0.3, 2.50, 2.8> color Gray90 <0.3, 3.50, 2.8> color Gray90
spotlight spotlight
radius 14 falloff 10 tightness 10 radius 14 falloff 10 tightness 10
point_at <0, 0.95, 0.22222222> point_at <0, 0.95, 0.22222222>
@@ -99,7 +104,7 @@ union {
#if ( (clock>166) & (clock<213) ) #if ( (clock>166) & (clock<213) )
light_source { light_source {
<2, 0.30, -2> color Yellow <2, 10.30, -2> color Yellow
spotlight spotlight
radius 12 falloff 20 tightness 10 radius 12 falloff 20 tightness 10
point_at <-0.08, 0.80, 0.17> point_at <-0.08, 0.80, 0.17>
@@ -116,7 +121,7 @@ union {
#end #end
color Couleur color Couleur
spotlight spotlight
radius 9 falloff 10 tightness 5 radius 12 falloff 10 tightness 5
point_at <0, 0.95, -0.22> point_at <0, 0.95, -0.22>
} }
#end #end
@@ -139,7 +144,7 @@ sky_sphere {
scale 1.804 scale 1.804
// translate -1 // translate -1
} }
#local Kem = 0.15; #local Kem = 0.09;
emission rgb <Kem, Kem, Kem> emission rgb <Kem, Kem, Kem>
} }
// } // }

View File

@@ -2,22 +2,24 @@
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024 * nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
*/ */
#declare RA = R_basecone;
// #declare RB = 0.001;
#declare HexaCone_shape = object #declare HexaCone_shape = object
{ {
#local RA = 0.125;
#local RB = 0.001;
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 }
} }
} }
#declare HexaCone_body = object #macro HexaCone_Body ()
{ // #declare HexaCone_body = object
// {
union { union {
difference { difference {
object { HexaCone_shape } object { HexaCone_shape }
@@ -27,18 +29,18 @@ union {
RA*0.40 } RA*0.40 }
} }
difference { difference {
sphere {0, 0.20 } sphere {0, 0.21 }
sphere {0, 0.18 } sphere {0, 0.19 }
cylinder {-x, x, 0.10 } cylinder {-x, x, 0.11 }
cylinder {-y, y, 0.10 } cylinder {-y, y, 0.11 }
cylinder {-z, z, 0.10 } cylinder {-z, z, 0.11 }
} }
// clignotement de la lumiere \o/ // clignotement de la lumiere \o/
#local kR = 0.073; #local kR = 0.065;
#local xR = (rand(Rng2)-0.5000) * kR; #local xR = (rand(Rng2)-0.5000) * kR;
#local yR = (rand(Rng2)-0.5000) * kR; #local yR = (rand(Rng2)-0.5000) * kR;
#local zR = (rand(Rng2)-0.5000) * kR; #local zR = (rand(Rng2)-0.5000) * kR;
#local Value = sin(NormClock * 26.536); #local Value = sin( (NormClock * 26.536) + (3.14*rand(Rng1)) );
#if (Value < 0) #if (Value < 0)
#local Couleur = rgb <abs(Value), 0, 0>; #local Couleur = rgb <abs(Value), 0, 0>;
#else #else
@@ -52,8 +54,8 @@ union {
} }
} }
texture { New_Penny } texture { New_Penny }
} // }
#end
/* /*
* *
*/ */
@@ -72,7 +74,8 @@ merge {
} }
} }
} }
#declare HexaCone_radar = object
#declare HexaCone_radar_A = object
{ {
union { union {
#for (foo, 0, 360, 60) #for (foo, 0, 360, 60)
@@ -83,13 +86,30 @@ union {
rotate y*(foo-90) rotate y*(foo-90)
translate <PX, 0, PZ> translate <PX, 0, PZ>
} }
#local R2 = 0.08;
#end #end
torus { R2, 0.0034 translate -0.08*y } torus { 0.08, 0.0034 translate -0.08*y }
} }
texture { Soft_Silver scale 6.50 } texture { Soft_Silver scale 6.50 }
} }
#declare HexaCone_radar_B = object
{
union {
#for (foo, 0, 360, 60)
#local RR = 0.12;
#local PX = RR * sin(radians(foo));
#local PZ = RR * cos(radians(foo));
object { Branche_radar scale 2
rotate y*(foo-90)
translate <PX, 0, PZ>
}
#local R2 = 0.11;
#end
torus { R2, 0.0039 translate -0.08*y }
}
texture { T_Brass_1C scale 6.50 }
}
/* --------------------------------------------------------- /* ---------------------------------------------------------
* new Mon Dec 16 12:44:44 PM UTC 2024 * new Mon Dec 16 12:44:44 PM UTC 2024
*/ */
@@ -115,21 +135,25 @@ union {
} }
} }
#declare DTa = 0.278;
#declare DTb = 0.030;
#declare HexaCone_head = object #declare HexaCone_head = object
{ {
#local DTa = 0.278;
#local DTb = 0.030;
merge { merge {
difference { difference {
torus { DTa, DTb } torus { DTa, DTb }
#local TB = 0.50; #local TB = 0.60;
box { <-TB, -TB, TB>, <TB, TB, 0> } box { <-TB, -TB, TB>, <TB, TB, 0> }
} }
sphere { 0, DTb*1.55 translate -DTa*x } sphere { 0, DTb*1.65 translate -DTa*x }
sphere { 0, DTb*1.55 translate DTa*x } sphere { 0, DTb*1.65 translate DTa*x }
} }
texture { Orange_Glass } #if (rand(Rng1) < 0.8)
texture { Orange_Glass }
#else
texture { Dark_Green_Glass }
#end
} }
/* ------------------------------------------ /* ------------------------------------------
@@ -155,7 +179,7 @@ union {
#for (foo, -9, 9) #for (foo, -9, 9)
object { Une_Ailettte object { Une_Ailettte
translate -0.004*z translate -0.004*z
rotate z*19 rotate z*21
rotate (foo*35)*x rotate (foo*35)*x
translate (foo*0.013)*x } translate (foo*0.013)*x }
#end #end
@@ -194,7 +218,7 @@ merge {
#end #end
cylinder { y*Rtuy, y*(Rtuy+0.08), 0.011 scale <2.95, 1, 1> } cylinder { y*Rtuy, y*(Rtuy+0.08), 0.011 scale <2.95, 1, 1> }
sphere { 0, 0.017 scale <4.5, 1, 0.717> sphere { 0, 0.017 scale <4.8, 1, 0.717>
translate z*(Rtuy+Etuy/3) } translate z*(Rtuy+Etuy/3) }
} }
texture { T_Brass_1C } texture { T_Brass_1C }
@@ -221,14 +245,20 @@ rotate -y*90
// ###########################################################"" // ###########################################################""
#declare HexaCone = object #macro HexaCone ()
{ // #declare HexaCone = object
// {
union { union {
object { HexaCone_body } object { HexaCone_Body () }
#local T = 0.55; #local T = 0.55;
object { HexaCone_head translate <0, 0, T+DTa> } object { HexaCone_head translate <0, 0, T+DTa> }
object { HexaCone_radar translate <0, T+0.18, 0> } #if ( (rand(Rng1) > 0.27) )
object { HexaCone_radar_A translate <0, T+0.18, 0> }
#else
object { HexaCone_radar_B translate <0, T+0.18, 0> }
#end
object { HexaCone_derives translate <0, 0, -0.67> } object { HexaCone_derives translate <0, 0, -0.67> }
object { Les_Reacteurs translate -0.18*y } object { Les_Reacteurs translate -0.18*y }
} }
} // }
#end // macro

52
escadrille.pov Normal file
View File

@@ -0,0 +1,52 @@
/*
* H E X A C O N E
*
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/
#version 3.7;
#include "globals.inc"
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
// =======================================================
#for (idX, 0, 4)
#for (idZ, 0, 4)
#local posX = (idX * 4.56) - 6.5;
#local posY = 1.3 * (rand(Rng1)-0.5);
#local posZ = (idZ * 4.24) - 8.9;
#local Ry = (rand(Rng1) - 0.5) * 16;
#if (rand(Rng1) < 0.515)
object { HexaCone ()
rotate y*Ry translate <posX, posY, posZ> }
#else
object { HexaBenz ()
rotate y*Ry translate <posX, posY, posZ> }
#end
#end
#end
// =======================================================
#if (NormClock < 0.08)
light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
#end
light_source { < 11, 7, 4>, rgb <NormClock, 0.48, 0.80> }
// object { Repere scale 5 }
#local CamX = -8.7+(6.6*NormClock);
#local CamY = -5+(11.9*Cos_01(NormClock));
#local CamZ = 15.06+(2.9*Cos_010(NormClock));
camera {
location <CamX, CamY, CamZ>
look_at <0.0, 0.0, 0>
angle 53 - (3.57 * NormClock)
}

112
essai.pov
View File

@@ -1,53 +1,109 @@
/* /*
* H E X A C O N E - E S S A I * H E X A C O N E - E S S A I
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024 * nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/ */
#version 3.7; #version 3.7;
#include "globals.inc" #include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc"
// ======================================================= // =======================================================
#macro GyroPhare_mat ()
object { cylinder {
HexaBlob 0, y*H_gyro, R_gyro
#local SC = 1.71 + 0.5 * abs(sin(NormClock * 3 * 3.14159)); #if (rand(Rng1) < 0.5)
texture { T_Stone26 texture { T_Stone25 scale 1+rand(Rng1) }
scale SC #else
translate 3*y*NormClock texture { T_Stone6 }
#end
} }
translate < 0, 1, 0> #end // macro
#macro GyroPhare_lampe ()
union {
difference {
cylinder { 0, y*0.20, R_gyro }
cylinder { y*0.01, y*0.19, R_gyro*0.97 }
#local WB = 0.015;
box { <-1, 0.03, -WB>, <1, 0.18, WB> }
box { <-WB, 0.03, -1>, <WB, 0.18, 1> }
#undef WB
pigment { color White }
rotate y*(0.5-rand(Rng1))*clock
} }
light_source { y*0.10 rgb <0.8, 0.9, 0.999999999> }
}
#end // macro
// object { Le_Decor } #macro GyroPhare ()
// object { Repere } union {
object { GyroPhare_mat () }
object { GyroPhare_lampe ()
// rotate y*rand(Rng1)*clock
translate y*(H_gyro+0.02) }
}
#end // macro
// =======================================================
#if (0) #macro Bubble ()
object { HexaBalls sphere {
#local SC = 0.18 + abs(sin(NormClock * 4 * 3.14159)); 0, 0.06
texture { Lightning2 scale SC } #if ( rand(Rng1) < 0.333 )
translate <-0.80, 1, 0> } texture { Ruby_Glass }
#elseif ( rand(Rng1) < 0.666 )
texture { Orange_Glass }
#else
texture { Gold_Nugget }
#end
}
#end #end
#macro Un_Machin ()
union {
#for (Y, 1, 8, 1)
object { Bubble() translate y*Y*0.1 }
#end
}
#end
#declare Les_Machins = object
{
union {
#local Rk = 4.95;
#for (foo, 0, 360, 15)
#local Xpos = Rk * sin(radians(foo));
#local Zpos = Rk * cos(radians(foo));
#if ( rand(Rng1) < 0.40 )
object { GyroPhare () translate <Xpos, 0, Zpos> }
#else
object { Un_Machin () translate <Xpos, 0.33, Zpos> }
#end
#end
#undef Rk
}
}
object { Les_Machins translate y*0.01}
object { Le_Sol }
// object { Repere }
// ======================================================= // =======================================================
light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> } // light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
// light_source { <-11, 7, 9>, rgb <0.31, NormClock, 0.80> } // light_source { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
light_source { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
#local CamX = -12.7 + (5.8*NormClock);
#local CamY = 8.81 + (14*sqrt(NormClock));
camera { camera {
location <-0.7+NormClock, 1.81, 2.09> location <CamX, CamY, 9.99>
look_at <0.0, 1.0, 0> look_at <0, 0, 0>
angle 54 angle 42 + 8*Cos_01(NormClock)
} }

View File

@@ -7,6 +7,9 @@ Avant tout, il faut créer ces répertoires :
├── orbite ├── orbite
├── passage ├── passage
├── scene ├── scene
├── Spool ├── scene
├── orbite
├── escadrille
└── topview └── topview
```

View File

@@ -1,19 +1,39 @@
global_settings { global_settings {
assumed_gamma 1.0 assumed_gamma 1.0
ambient_light rgb <0.17, 0.14, 0.17> ambient_light rgb <0.18, 0.18, 0.21>
max_trace_level 15 max_trace_level 15
} }
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#declare Rng1 = seed(1337); #declare Rng1 = seed(1337);
#declare foo = rand(Rng1); #declare foo = rand(Rng1);
#declare Rng2 = seed(now*24*60*60); #declare Rng2 = seed(now*24*60*60);
#declare foo = rand(Rng2); #declare bar = rand(Rng2);
#declare NormClock = clock / 360.0; #declare NormClock = clock / 360.0;
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/*
* Some constants...
*/
#declare SzSol = 30;
#declare R_basecone = 0.117;
#declare H_cone = 0.97;
#declare R_gyro = 0.10;
#declare H_gyro = 1.20;
/* ------------------------------------------------------------ */
/*
* 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

View File

@@ -1,89 +1,131 @@
/* /*
* H E X A C O N E * H E X A B E N Z
*/ */
// ======================================================= // =======================================================
#declare Benz_Cone_Base = object #macro Benz_Cone_Base () // = object
{ // {
#local RA = 0.123;
#local RB = 0.001;
union { union {
cone { 0, RA, y, RB } #local RA = R_basecone;
// cylinder { 0, -0.08*y, RA*1.25 scale <1, 1, 4> } #local RB = 0.001;
sphere { 0, RA*1.092 scale <1, 0.64, 6> translate -0.02*y } cone { 0, RA, y*0.89, 0.0001 }
sphere { 0, RA*1.098 scale <1, 0.62, 3.03> translate -0.02*y }
} }
} // }
#declare Benz_Cones = object #end
{
#macro Benz_Cones () // = object
// {
union { union {
#for (foo, 0, 360, 60) #for (foo, 0, 360, 60)
#local E = 0.40; #local E = 0.38;
#local Tx = E * sin(radians(foo)); #local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo)); #local Ty = E * cos(radians(foo));
object { Benz_Cone_Base object {
texture { Soft_Silver scale 16.50 } 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 rotate -z*foo
translate <Tx, Ty, 0> translate <Tx, Ty, 0>
} }
#end #end
} }
} // }
#end
// ------------------------------------------------------ // ------------------------------------------------------
#local RT = 0.24; #local R_Tube = 0.20;
#local LT = 0.67; #local L_Tube = 0.54;
#declare Benz_Tubules = object #declare Benz_Tubules = object
{ {
union { merge {
#local E = 0.17; #local E = R_Tube * 0.0910;
#local R = 0.010; #local R = 0.01;
#for (foo, 0, 360, 20) #for (foo, 0, 360, 20)
#local Tx = E * sin(radians(foo)); #local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo)); #local Ty = E * cos(radians(foo));
#local Dz = z * 2.02; #local Dza = z * 0.20;
cylinder { -Dz, Dz, R translate <Tx, Ty, 0> } #local Dzb = z * 0.90;
sphere { -Dz, R translate <Tx, Ty, 0> } cylinder { -Dza, Dzb, R translate <Tx, Ty, 0> }
sphere { Dz, R translate <Tx, Ty, 0> } sphere { -Dza, R*1.8 translate <Tx, Ty, 0> }
sphere { Dzb, R*1.8 translate <Tx, Ty, 0> }
#end #end
} }
texture { Yellow_Glass } #if ( rand(Rng1) < 0.333)
texture { Orange_Glass }
#else
texture { Yellow_Glass }
#end
} }
#declare Benz_Fuseau = object #declare Benz_Fuseau = object
{ {
sphere { 0, RT*0.39 scale <1, 1, 9> } difference {
texture { Gold_Nugget scale 0.56 } 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 #declare Benz_Cylindre = object
{ {
difference { difference {
union { union {
cylinder { z*LT*2.08, -z*LT, RT } cylinder { z*L_Tube*1.5, -z*L_Tube, R_Tube }
sphere { z*LT*1.7, RT*0.72 translate y*RT*0.87} /* 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, RT*0.95 } cylinder { z*4, -z*4, R_Tube*0.95 }
} }
texture { Soft_Silver scale 6.0 } texture { Soft_Silver scale 6.0 }
} }
#declare Benz_Tube = object #macro Benz_Tube ()
{ // #declare Benz_Tube = object
// {
union { union {
object { Benz_Tubules } object { Benz_Tubules }
object { Benz_Fuseau } object { Benz_Fuseau_Flash translate z*0.40 }
object { Benz_Cylindre } object { Benz_Cylindre }
} }
} // }
#end
// ------------------------------------------------------ // ------------------------------------------------------
#declare HexaBenz = object #macro HexaBenz ()
{ // #declare HexaBenz = object
// {
union { union {
object { Benz_Cones rotate z*NormClock*99.999} #local Rk = (rand(Rng1)-0.5) * 1024;
object { Benz_Tube } object { Benz_Cones () rotate z*NormClock*Rk}
object { Benz_Tube () }
} }
} // }
#end

View File

@@ -15,21 +15,24 @@
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc" #include "hexabenz.inc"
object { HexaBenz }
#local K = 1.48;
object { HexaBenz () rotate y*90 translate -x*K }
object { HexaBenz () translate x*K }
// ======================================================= // =======================================================
light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> } light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> }
light_source { <19, 7, -14>, rgb <0.77, 0.79, 0.80> } light_source { <19, 9, -14>, rgb <0.87, 0.79, 0.70> }
// object { Repere scale 2 } // object { Repere scale 2 }
camera { camera {
location <-1.9+(5*NormClock), 0.50, 6.59> location <-1.9+(8*NormClock), 0.70, 7.59-NormClock>
look_at <0.37, 0.0, 0> look_at <0.37, 0.0, 0>
focal_point <0.37, 0.0, 0> focal_point <0.37, 0.0, 0>
aperture 0.046 aperture 0.046
blur_samples 30 blur_samples 30
angle 60 - 21 * Cos_01(NormClock) angle 60 - 28 * Cos_01(NormClock)
} }

46
hexacone.pov Normal file
View File

@@ -0,0 +1,46 @@
/*
* H E X A C O N E - H E X A C O N E
*/
#version 3.7;
#include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
#declare Cone_Repere = object
{
union {
object { HexaCone () }
object { Repere translate <-0.4, -0.2, -0.5> }
}
}
#local K = 1.48;
object { Cone_Repere rotate y*90 translate -x*K }
object { Cone_Repere translate x*K }
// =======================================================
light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> }
light_source { <19, 9, -14>, rgb <0.87, 0.79, 0.70> }
// object { Repere scale 2 }
camera {
location <-1.9+(8*NormClock), 0.70, 7.59-NormClock>
look_at <0.37, 0.0, 0>
focal_point <0.37, 0.0, 0>
aperture 0.046
blur_samples 30
angle 55 - 28 * Cos_01(NormClock)
}

View File

@@ -6,16 +6,12 @@
#include "globals.inc" #include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc"
// ======================================================= // =======================================================
#declare R_planete = 2.1; #declare R_planete = 1.42;
#declare Croute = object #declare Croute = object
{ {
@@ -32,7 +28,8 @@ difference {
box { <-BN, -BN, -HC>, <BN, BN, HC> } box { <-BN, -BN, -HC>, <BN, BN, HC> }
} }
texture { texture {
pigment { color Gray10 } pigment { color rgb <0.20, 0.40, 0.10> }
finish { reflection 0.25 }
} }
} }
@@ -40,8 +37,8 @@ texture {
{ {
sphere { 0, R_planete } sphere { 0, R_planete }
texture { texture {
pigment { color Gray80 } pigment { rgb <0.70, 0.50, 0.70> }
finish { reflection 0.500 } finish { reflection 0.25 }
} }
} }
@@ -54,23 +51,31 @@ union {
} }
// ======================================================= // =======================================================
#local RO = 4.10; #local RO = 4.15;
#local CK = NormClock * 7.87; #local CK = NormClock * 7.87;
#declare PosX = RO * sin(CK); #declare PosX = RO * sin(CK);
#declare PosY = 0; #declare PosY = 0;
#declare PosZ = RO * cos(CK); #declare PosZ = RO * cos(CK);
object { HexaBenz ()
object { HexaCone rotate -y*CK*2.333 translate <PosX, PosY, PosZ>
rotate -y*CK translate <PosX, PosY, PosZ> }
#declare PosX = RO * sin(CK+2.12);
#declare PosY = 0;
#declare PosZ = RO * cos(CK+2.23);
object { HexaCone ()
rotate y*CK*3.222 translate <PosX, PosY, PosZ>
} }
object { Planete rotate (-clock*0.21)*y } object { Planete rotate (-clock*0.21)*y }
light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> } light_source { <19, 6, 15>, rgb <0.77, 0.79, 0.80> }
camera { camera {
location <3, 2.01, 7.59> location <3, 1.50, 7.59>
look_at <0.0, 0.0, 0> look_at <0.0, 0.0, 0>
angle 58 focal_point <0.07, 0.0, 0>
aperture 0.046
blur_samples 30
angle 62
} }

View File

@@ -13,18 +13,21 @@
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc"
// --------------------------------------- // ---------------------------------------
object { Le_Decor } object { Le_Decor }
#declare PosX = 0.333; #declare PosX = 0.333;
#declare PosY = 1.20 + (NormClock*0.22); #declare PosY = 1.10 + (NormClock*0.24);
#declare PosZ = (NormClock-0.5) * 34.22; #declare PosZ = (NormClock-0.5) * 53.27;
object { HexaCone translate <PosX, PosY, PosZ> } object { HexaBenz () translate <PosX, PosY, PosZ> }
object { HexaCone () translate <PosX+1.96, PosY+1.42, PosZ-11.5> }
object { HexaCone () translate <PosX-1.96, PosY+2.42, PosZ-17.5> }
#if ( (clock < 111) ) #if ( (clock < 141) )
light_source { light_source {
<3, 0.30, -8> color Blue <3, 0.30, -8> color Blue
spotlight spotlight
@@ -35,23 +38,23 @@ light_source {
} }
#end #end
#if ( (clock > 230) ) #if ( (clock > 230) & (clock < 300) )
light_source { light_source {
<2, 0.30, -2> color White <2, 0.30, -2> color White
spotlight spotlight
radius .044 radius .044
falloff 2 falloff 2
tightness 3 tightness 3
point_at <PosX, PosY, PosZ> point_at <PosX, PosY-0.30, PosZ>
} }
#end #end
camera { camera {
location <-1.56, 1.03, 9.76> location <-1.76, 1.03, 9.76>
look_at <PosX, PosY, PosZ> look_at <PosX+0.08, PosY, PosZ>
// focal_point <0, 1, 0> // focal_point <0, 1, 0>
// aperture 0.046 // aperture 0.046
// blur_samples 30 // blur_samples 30
angle 36 angle 34
} }

View File

@@ -14,14 +14,18 @@
#declare NormClock = clock / 360.0; #declare NormClock = clock / 360.0;
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc"
object { Le_Decor } object { Le_Decor }
object { HexaCone
rotate < 3, 0, -4>
rotate y*17 translate y*1.11 }
#declare CK = 56 + (clock * 1); object { HexaCone ()
#declare Dcam = 2.14; rotate < 3, 0, -4> rotate y*17 translate y*1.11 }
object { HexaBenz ()
rotate <6, 40, -7> translate <-8, 3, 7> }
#declare CK = 96 + (clock * 1);
#declare Dcam = 2.22;
#declare CamX = Dcam * sin(radians(CK)); #declare CamX = Dcam * sin(radians(CK));
#declare CamZ = Dcam * 1.20 * cos(radians(CK)); #declare CamZ = Dcam * 1.20 * cos(radians(CK));
#declare CamZ = CamZ - 0.11; #declare CamZ = CamZ - 0.11;

View File

@@ -2,3 +2,10 @@
Build system and utilities. Build system and utilities.
## Linkfarming
## Encoding
## Plot the timing

View File

@@ -2,6 +2,17 @@
set -eu set -eu
# -------------------------------------------------------------- # --------------------------------------------------------------
visual_sleep ()
{
for foo in $(seq 0 $1) ; do
printf '*'
sleep 1
done
echo
}
# --------------------------------------------------------------
# un essai qui semble un echec.
#
ralentisseur () ralentisseur ()
{ {
temps=$1 temps=$1
@@ -14,7 +25,6 @@ if [ $load -gt 10 ] ; then
sleep $attente sleep $attente
fi fi
} }
# -------------------------------------------------------------- # --------------------------------------------------------------
ff_encodage() ff_encodage()
@@ -35,7 +45,9 @@ ffmpeg -nostdin \
# wc -c $FILMNAME | tee -a WS/log # wc -c $FILMNAME | tee -a WS/log
} }
# -------------------------------------------------------------- # --------------------------------------------------------------
#
# celui-ci n'est pas terminé !
#
mp_encodage() mp_encodage()
{ {
# #

View File

@@ -6,6 +6,9 @@ IDX=0
SPOOL="frames/Spool" SPOOL="frames/Spool"
SEQNAME="none" SEQNAME="none"
TMP="WS/tmp.png" TMP="WS/tmp.png"
FONTE="Helvetica-Bold"
TEXTCOL="yellow"
STROKOL="darkblue"
source tools/fonctions.sh source tools/fonctions.sh
@@ -14,7 +17,7 @@ source tools/fonctions.sh
# file to the spool dir, so # file to the spool dir, so
# you can use it for tmp pics. # you can use it for tmp pics.
# #
addfile () copy_a_file ()
{ {
src="$1" src="$1"
dstname=$(printf "%s/%05d.png" $SPOOL $IDX) dstname=$(printf "%s/%05d.png" $SPOOL $IDX)
@@ -24,80 +27,111 @@ cp -f $src $dstname
IDX=$(( IDX + 1 )) IDX=$(( IDX + 1 ))
} }
# ------------------------------------------------------- # -------------------------------------------------------
linkfarm () linkfarm ()
{ {
SRC="frames/$1" SRC="frames/$1"
echo "linkfarm $SRC" | tee -a WS/log echo "linkfarm $SRC" | tee -a WS/log
tools/plot-timing.sh $1
local NBRE=60
local NBRE=30
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
addfile "$SRC/00000.png" copy_a_file "WS/negatif.png"
done
for foo in $(seq 0 $NBRE)
do
copy_a_file "$SRC/00000.png"
done done
for src in "$SRC"/* for src in "$SRC"/*
do do
addfile $src copy_a_file $src
done done
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
addfile "$SRC/00359.png" copy_a_file "$SRC/00359.png"
done done
sync
} }
# ------------------------------------------------------- # -------------------------------------------------------
faire_le_titre () faire_le_titre ()
{ {
echo "faire le titre" echo "faire le titre"
local NBRE=190 local NBRE=180
local SRC="frames/passage/00059.png"
local GRAY="/dev/shm/tmp-titre.png"
convert -colorspace gray -colors 27 $SRC $GRAY
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
Ypos=$(( 500 - ( foo / 2 ) )) Ypos=$(( -175 + foo ))
convert "WS/negatif.png" \ convert ${GRAY} \
-gravity north \ -gravity north \
-font Courier-Bold \ -font $FONTE \
-pointsize 96 \ -pointsize 172 \
-fill white \ -kerning 6 \
-annotate +0+${Ypos} "HexaCone(s)" \ -fill $TEXTCOL \
-strokewidth 3 -stroke $STROKOL \
-annotate +0+${Ypos} "HexaCone" \
${TMP} ${TMP}
# identify ${TMP} # identify ${TMP}
addfile ${TMP} copy_a_file ${TMP}
printf "."
done done
echo
} }
# ------------------------------------------------------- # -------------------------------------------------------
faire_la_fin () faire_la_fin ()
{ {
local NBRE=120 local NBRE=180
datetime=$(LANG=fr date -u +"%Y/%m/%d")
echo $datetime | tee -a WS/log
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
Ypos=$(( foo + 100 )) Ypos=$(( foo + 20 ))
convert "WS/negatif.png" \ convert "WS/negatif.png" \
-gravity north \ -gravity north \
-font Courier-Bold \ -font $FONTE \
-pointsize 48 \ -pointsize 86 \
-fill white \ -kerning 6 \
-strokewidth 2 -stroke gray30 \ -fill $TEXTCOL \
-strokewidth 2 -stroke $STROKOL \
-annotate +0+${Ypos} \ -annotate +0+${Ypos} \
"tTh des Bourtoulots\n2025" \ "un film de\ntTh des Bourtoulots" \
-pointsize 48 \
-strokewidth 1 \
-gravity south \
-annotate +0+170 "${datetime}" \
${TMP} ${TMP}
# identify ${TMP} # identify ${TMP}
addfile ${TMP} copy_a_file ${TMP}
printf "."
done done
echo
} }
# ------------------------------------------------------- # -------------------------------------------------------
rm frames/Spool/*.png figlet "Link farmer"
tools/plot-timing.sh rm -f frames/Spool/*.png
# tools/plot-timing.sh
faire_le_titre faire_le_titre
linkfarm hexabenz linkfarm hexabenz
linkfarm orbite linkfarm hexacone
linkfarm escadrille
linkfarm topview linkfarm topview
linkfarm passage linkfarm passage
linkfarm scene linkfarm scene
linkfarm orbite
linkfarm essai linkfarm essai
tools/plot-timing.sh tools/plot-timing.sh
@@ -105,6 +139,9 @@ faire_la_fin
ff_encodage Spool full.mp4 ff_encodage Spool full.mp4
nb=$(( $IDX - 1 ))
echo "linkfarmed $nb files" | tee -a WS/log

View File

@@ -1,30 +1,22 @@
#!/bin/bash #!/bin/bash
source fonctions.sh
set -e ; set -u set -e ; set -u
source tools/fonctions.sh
TYPE="mp4"
SEQNAME="$1" SEQNAME="$1"
NBFRAMES=360 NBFRAMES=360
case $TYPE in
"gif89a") DIMS="-W640 -H480" ;;
"mp4") DIMS="-W1024 -H768" ;;
esac
echo "Running $0 $TYPE $SEQNAME" >> WS/log echo "Running $0 $SEQNAME" >> WS/log
POVOPT="+q9 +a0.01 -d ${DIMS} -WT6" DIMS="-W1024 -H768"
POVOPT="+q9 -a -d ${DIMS} -WT6"
echo $POVOPT ; echo ; sleep 2 echo $POVOPT ; echo ; sleep 2
TMPIMG=/dev/shm/${SEQNAME}-tmp.png TMPIMG=/dev/shm/${SEQNAME}-tmp.png
for frame in $(seq 0 $((NBFRAMES-1))) for frame in $(seq 0 $((NBFRAMES-1)))
do do
# figlet -k $frame ; sleep 1
ralentisseur 25
img=$(printf "frames/%s/%05d.png" $SEQNAME $frame) img=$(printf "frames/%s/%05d.png" $SEQNAME $frame)
debut=$(date +%s) debut=$(date +%s)
@@ -34,33 +26,29 @@ do
if [ $err != 0 ] ; then if [ $err != 0 ] ; then
echo "$SEQNAME fail $frame" >> WS/log echo "$SEQNAME fail $frame" >> WS/log
mogrify -colorspace gray $img mogrify -colorspace gray $img
sleep 6 visual_sleep 12
continue continue
fi fi
set -e set -e
txt=$(printf "%s %03d" ${SEQNAME} $frame) txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '0' 'o')
# echo $frame $img $txt # echo $frame $img $txt
convert ${TMPIMG} \ convert ${TMPIMG} \
-font Courier-Bold \ -font Courier-Bold \
-pointsize 16 \ -pointsize 18 \
-fill turquoise \ -fill Gray80 \
-gravity south \ -gravity south \
-annotate +0+5 "$txt" \ -annotate +0+5 "$txt" \
${img} ${img}
fin=$(date +%s) fin=$(date +%s)
echo ; sleep 1 echo
echo ${SEQNAME} $frame $(( fin - debut )) | \ echo ${SEQNAME} $frame $(( fin - debut )) | \
tee -a WS/mp4.timing tee -a WS/mp4.timing
echo ; sleep 1 echo ; sleep 3
done done
echo echo
case $TYPE in ff_encodage $SEQNAME wip-${SEQNAME}.mp4
"gif89a") convert -delay 8 -dither none \
-colors 102 frames/* foo.gif ;;
"mp4") ff_encodage $SEQNAME wip-${SEQNAME}.mp4 ;;
esac
echo "+------- build of $SEQNAME done" echo "+------- build of $SEQNAME done"

View File

@@ -5,10 +5,17 @@ set -ue
TMPFILE="/dev/shm/plot-timing.tmp" TMPFILE="/dev/shm/plot-timing.tmp"
IMAGE="timing.png" IMAGE="timing.png"
echo ; figlet "plot timing" ; echo if [ $# == 1 ]
wc WS/mp4.timing | tee -a WS/log then
sequence=$1
else
sequence="escadrille"
fi
grep "passage" WS/mp4.timing | awk ' \ echo "plot timing $sequence" | tee -a WS/log
# wc WS/mp4.timing | tee -a WS/log
grep $sequence WS/mp4.timing | tail -3600 | awk ' \
BEGIN { \ BEGIN { \
nbrames=360; \ nbrames=360; \
for (foo=0; foo<nbrames; foo++) { \ for (foo=0; foo<nbrames; foo++) { \
@@ -44,13 +51,13 @@ gnuplot << __EOC__
set grid set grid
set xrange [:360] set xrange [:360]
set yrange [0:] set yrange [0:]
set title "HexaCone : temps de rendu" set title "Séquence '${sequence}'"
set xlabel "numéro de la trame" set xlabel "numéro de la trame"
set ylabel "temps en secondes" set ylabel "temps en secondes"
plot "/dev/shm/plot-timing.tmp" u 1:4 w l t "maximum", \ plot "/dev/shm/plot-timing.tmp" u 1:4 w l lc "#ff0000" t "maximum", \
"/dev/shm/plot-timing.tmp" u 1:3 w l t "minimum", \ "/dev/shm/plot-timing.tmp" u 1:3 w l lc "#0000ff" t "minimum", \
"/dev/shm/plot-timing.tmp" u 1:2 w l t "moyenne", "/dev/shm/plot-timing.tmp" u 1:2 w l lc "#000000" t "moyenne",
__EOC__ __EOC__
convert -negate $IMAGE WS/negatif.png convert -negate -colorspace gray -level -33% $IMAGE WS/negatif.png

View File

@@ -13,18 +13,23 @@
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc"
object { Le_Decor } object { Le_Decor }
light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> }
#declare TrX = 1.34 * sqrt(NormClock);
#declare TrX = 1.84 * sqrt(NormClock);
#declare TrY = 0.90 + (3.5 * Cos_01(NormClock)); #declare TrY = 0.90 + (3.5 * Cos_01(NormClock));
#declare TrZ = 9.999 * sqrt(NormClock); #declare TrZ = 9.999 * sqrt(NormClock);
#declare TrH = <TrX, TrY, TrZ>; #declare TrH = <TrX, TrY, TrZ>;
#declare RrY = 57 * sqrt(NormClock); #declare RrY = 97 * sqrt(NormClock);
object { HexaCone () rotate y*RrY translate TrH }
object { HexaCone rotate y*RrY translate TrH } object { HexaCone () rotate z*9.1 translate <5, 3, -8> }
object { HexaBenz () translate <-4, 2, -6> }
light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> }
// object { Repere scale 2 } // object { Repere scale 2 }
#declare CamY = 19 - (4.5*NormClock); #declare CamY = 19 - (4.5*NormClock);