Compare commits

..

14 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
17 changed files with 230 additions and 109 deletions

View File

@@ -8,7 +8,8 @@ CK=180
PNG: essai.png scene.png topview.png passage.png \
orbite.png hexabenz.png escadrille.png
orbite.png hexabenz.png escadrille.png \
hexacone.png
topview.png: topview.pov Makefile $(POVDEP)
@@ -20,6 +21,9 @@ essai.png: essai.pov Makefile $(POVDEP)
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)
povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@

View File

@@ -29,13 +29,13 @@ union {
object { HexaBalls
texture { Lightning1 scale 0.33 }
rotate <clock/3, clock/6, clock/9>
translate <3, -1.2+1.01*Cos_010(NormClock), 5>
translate <5, -1.2+1.01*Cos_010(NormClock), 7>
}
object { HexaBalls
texture { Lightning2 scale 0.56 }
// rotate <-clock, clock*0.33333, clock>
translate <5, -1+0.82*Cos_010(NormClock), -4>
translate <7, -1+0.89*Cos_010(NormClock), -6>
}
}
}
@@ -62,8 +62,6 @@ blob {
// =======================================================
#declare SzSol = 26;
#declare Le_Sol = object
{
height_field {

View File

@@ -2,18 +2,18 @@
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
*/
#declare RA = 0.127;
#declare RB = 0.001;
#declare RA = R_basecone;
// #declare RB = 0.001;
#declare HexaCone_shape = object
{
union {
cone { 0, RA, <-1, 0, 0>, RB }
cone { 0, RA, < 1, 0, 0>, RB }
cone { 0, RA, < 0, 0, 1>, RB }
cone { 0, RA, < 0, 0, -1>, RB }
cone { 0, RA, < 0, 1, 0>, RB }
cone { 0, RA, < 0, -1, 0>, RB }
cone { 0, RA, <-1, 0, 0>, 0.0001 }
cone { 0, RA, < 1, 0, 0>, 0.0001 }
cone { 0, RA, < 0, 0, 1>, 0.0001 }
cone { 0, RA, < 0, 0, -1>, 0.0001 }
cone { 0, RA, < 0, 1, 0>, 0.0001 }
cone { 0, RA, < 0, -1, 0>, 0.0001 }
}
}
@@ -40,7 +40,7 @@ union {
#local xR = (rand(Rng2)-0.5000) * kR;
#local yR = (rand(Rng2)-0.5000) * kR;
#local zR = (rand(Rng2)-0.5000) * kR;
#local Value = sin( (NormClock * 26.536) + (2*rand(Rng1)) );
#local Value = sin( (NormClock * 26.536) + (3.14*rand(Rng1)) );
#if (Value < 0)
#local Couleur = rgb <abs(Value), 0, 0>;
#else

View File

@@ -37,16 +37,16 @@
light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
#end
light_source { < 11, 7, 4>, rgb <NormClock, 0.28, 0.80> }
light_source { < 11, 7, 4>, rgb <NormClock, 0.48, 0.80> }
// object { Repere scale 5 }
#local CamX = -8.7+(2.6*NormClock);
#local CamY = -5+(6.9*Cos_01(NormClock));
#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 48 - (3.57 * NormClock)
angle 53 - (3.57 * NormClock)
}

View File

@@ -7,30 +7,65 @@
#include "globals.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
// =======================================================
#macro GyroPhare_mat ()
cylinder {
0, y*H_gyro, R_gyro
#if (rand(Rng1) < 0.5)
texture { T_Stone25 scale 1+rand(Rng1) }
#else
texture { T_Stone6 }
#end
}
#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
#macro GyroPhare ()
union {
object { GyroPhare_mat () }
object { GyroPhare_lampe ()
// rotate y*rand(Rng1)*clock
translate y*(H_gyro+0.02) }
}
#end // macro
// =======================================================
#macro Bubble ()
sphere {
0, 0.10
0, 0.06
#if ( rand(Rng1) < 0.333 )
texture { Ruby_Glass }
#elseif ( rand(Rng1) < 0.666 )
tus texture { Orange_Glass }
texture { Orange_Glass }
#else
texture { Gold_Nugget scale 0.56 }
texture { Gold_Nugget }
#end
}
#end
#macro Un_Machin ()
union {
#for (Y, -8, 8, 2)
#for (Y, 1, 8, 1)
object { Bubble() translate y*Y*0.1 }
#end
}
@@ -39,28 +74,36 @@ union {
#declare Les_Machins = object
{
union {
#for (Xp, -10, 10)
#if ( rand(Rng1) < 0.5 )
object { HexaCone_radar_A translate x*Xp*0.6 }
#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 x*Xp*0.6 }
object { Un_Machin () translate <Xpos, 0.33, Zpos> }
#end
#end
#undef Rk
}
}
object { Les_Machins }
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 { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
// light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
// 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 {
location <-10.7+4*NormClock, 2.81, 8.09>
look_at <0.0, 0.0, 0>
angle 44
location <CamX, CamY, 9.99>
look_at <0, 0, 0>
angle 42 + 8*Cos_01(NormClock)
}

View File

@@ -1,7 +1,7 @@
global_settings {
assumed_gamma 1.0
ambient_light rgb <0.23, 0.23, 0.21>
ambient_light rgb <0.18, 0.18, 0.21>
max_trace_level 15
}
@@ -18,7 +18,22 @@ global_settings {
#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 )
(0.5-0.5*cos( 3.141592654 * X))
#end

View File

@@ -1,15 +1,15 @@
/*
* H E X A C O N E
* H E X A B E N Z
*/
// =======================================================
#macro Benz_Cone_Base () // = object
// {
union {
#local RA = 0.117;
#local RA = R_basecone;
#local RB = 0.001;
cone { 0, RA, y*0.89, RB }
sphere { 0, RA*1.098 scale <1, 0.62, 3.1> 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 }
}
// }
#end
@@ -18,7 +18,7 @@ union {
// {
union {
#for (foo, 0, 360, 60)
#local E = 0.40;
#local E = 0.38;
#local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo));
object {
@@ -38,14 +38,14 @@ union {
// ------------------------------------------------------
#local RT = 0.21;
#local LT = 0.54;
#local R_Tube = 0.20;
#local L_Tube = 0.54;
#declare Benz_Tubules = object
{
merge {
#local E = 0.167;
#local R = 0.010;
#local E = R_Tube * 0.0910;
#local R = 0.01;
#for (foo, 0, 360, 20)
#local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo));
@@ -66,13 +66,13 @@ merge {
#declare Benz_Fuseau = object
{
difference {
sphere { 0, RT*0.39 }
sphere { 0, RT*0.37 }
cylinder { <-1, 0, -1>, < 1, 0, 1>, RT*0.21 }
cylinder { < 1, 0, -1>, <-1, 0, 1>, RT*0.21 }
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 { Gold_Nugget scale 0.56 }
texture { Shadow_Clouds scale 0.56 }
}
#declare Benz_Fuseau_Flash = object
@@ -93,11 +93,14 @@ rotate -z*clock*6
{
difference {
union {
cylinder { z*LT*1.5, -z*LT, RT }
sphere { z*LT*1.4, RT*0.72 scale <1, 0.73, 1>
translate y*RT*0.87}
cylinder { z*L_Tube*1.5, -z*L_Tube, R_Tube }
/* 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 }
}
@@ -119,7 +122,7 @@ union {
// #declare HexaBenz = object
// {
union {
#local Rk = (rand(Rng1)-0.5) * 2038;
#local Rk = (rand(Rng1)-0.5) * 1024;
object { Benz_Cones () rotate z*NormClock*Rk}
object { Benz_Tube () }
}

View File

@@ -25,7 +25,7 @@ object { HexaBenz () 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 }
// object { Repere scale 2 }
camera {
location <-1.9+(8*NormClock), 0.70, 7.59-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

@@ -11,7 +11,7 @@
#include "hexabenz.inc"
// =======================================================
#declare R_planete = 1.72;
#declare R_planete = 1.42;
#declare Croute = object
{

View File

@@ -20,12 +20,12 @@
object { Le_Decor }
#declare PosX = 0.333;
#declare PosY = 1.20 + (NormClock*0.24);
#declare PosY = 1.10 + (NormClock*0.24);
#declare PosZ = (NormClock-0.5) * 53.27;
object { HexaCone () translate <PosX, PosY, PosZ> }
object { HexaBenz () translate <PosX+1.96, PosY+1.42, PosZ-11.5> }
object { HexaBenz () translate <PosX-1.96, PosY+2.42, PosZ-17.5> }
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 < 141) )
light_source {
@@ -51,7 +51,7 @@ light_source {
camera {
location <-1.76, 1.03, 9.76>
look_at <PosX, PosY, PosZ>
look_at <PosX+0.08, PosY, PosZ>
// focal_point <0, 1, 0>
// aperture 0.046
// blur_samples 30

View File

@@ -19,13 +19,13 @@
object { Le_Decor }
object { HexaCone ()
rotate < 3, 0, -4>rotate y*17 translate y*1.11 }
rotate < 3, 0, -4> rotate y*17 translate y*1.11 }
object { HexaBenz ()
rotate <6, 40, -7> translate <-12, 3, 11> }
rotate <6, 40, -7> translate <-8, 3, 7> }
#declare CK = 56 + (clock * 1);
#declare Dcam = 2.17;
#declare CK = 96 + (clock * 1);
#declare Dcam = 2.22;
#declare CamX = Dcam * sin(radians(CK));
#declare CamZ = Dcam * 1.20 * cos(radians(CK));
#declare CamZ = CamZ - 0.11;
@@ -37,7 +37,7 @@ camera {
focal_point Lat
aperture 0.046
blur_samples 30
angle 72
angle 70
}
/**

View File

@@ -2,7 +2,15 @@
set -eu
# --------------------------------------------------------------
#
visual_sleep ()
{
for foo in $(seq 0 $1) ; do
printf '*'
sleep 1
done
echo
}
# --------------------------------------------------------------
# un essai qui semble un echec.
#
ralentisseur ()
@@ -17,7 +25,6 @@ if [ $load -gt 10 ] ; then
sleep $attente
fi
}
# --------------------------------------------------------------
ff_encodage()

View File

@@ -6,8 +6,8 @@ IDX=0
SPOOL="frames/Spool"
SEQNAME="none"
TMP="WS/tmp.png"
FONTE="Palatino-Bold"
TEXTCOL="orange"
FONTE="Helvetica-Bold"
TEXTCOL="yellow"
STROKOL="darkblue"
source tools/fonctions.sh
@@ -17,7 +17,7 @@ source tools/fonctions.sh
# file to the spool dir, so
# you can use it for tmp pics.
#
addfile ()
copy_a_file ()
{
src="$1"
dstname=$(printf "%s/%05d.png" $SPOOL $IDX)
@@ -27,25 +27,33 @@ cp -f $src $dstname
IDX=$(( IDX + 1 ))
}
# -------------------------------------------------------
linkfarm ()
{
SRC="frames/$1"
echo "linkfarm $SRC" | tee -a WS/log
tools/plot-timing.sh $1
local NBRE=60
local NBRE=30
for foo in $(seq 0 $NBRE)
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
for src in "$SRC"/*
do
addfile $src
copy_a_file $src
done
for foo in $(seq 0 $NBRE)
do
addfile "$SRC/00359.png"
copy_a_file "$SRC/00359.png"
done
}
# -------------------------------------------------------
@@ -54,10 +62,15 @@ faire_le_titre ()
echo "faire le titre"
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)
do
Ypos=$(( 210 - ( foo / 3 ) ))
convert "WS/negatif.png" \
Ypos=$(( -175 + foo ))
convert ${GRAY} \
-gravity north \
-font $FONTE \
-pointsize 172 \
@@ -67,7 +80,7 @@ do
-annotate +0+${Ypos} "HexaCone" \
${TMP}
# identify ${TMP}
addfile ${TMP}
copy_a_file ${TMP}
printf "."
done
echo
@@ -75,13 +88,13 @@ echo
# -------------------------------------------------------
faire_la_fin ()
{
local NBRE=150
datetime=$(LANG=fr date -u +"%Y/%M/%D")
local NBRE=180
datetime=$(LANG=fr date -u +"%Y/%m/%d")
echo $datetime | tee -a WS/log
for foo in $(seq 0 $NBRE)
do
Ypos=$(( foo + 100 ))
Ypos=$(( foo + 20 ))
convert "WS/negatif.png" \
-gravity north \
-font $FONTE \
@@ -89,14 +102,15 @@ do
-kerning 6 \
-fill $TEXTCOL \
-strokewidth 2 -stroke $STROKOL \
-annotate +0+${Ypos} "tTh des Bourtoulots" \
-annotate +0+${Ypos} \
"un film de\ntTh des Bourtoulots" \
-pointsize 48 \
-strokewidth 1 \
-gravity south \
-annotate +0+270 "${datetime}" \
-annotate +0+170 "${datetime}" \
${TMP}
# identify ${TMP}
addfile ${TMP}
copy_a_file ${TMP}
printf "."
done
echo
@@ -107,10 +121,11 @@ figlet "Link farmer"
rm -f frames/Spool/*.png
tools/plot-timing.sh
# tools/plot-timing.sh
faire_le_titre
linkfarm hexabenz
linkfarm hexacone
linkfarm escadrille
linkfarm topview
linkfarm passage
@@ -124,7 +139,8 @@ faire_la_fin
ff_encodage Spool full.mp4
echo "linkfarmed $IDX files" | tee -a WS/log
nb=$(( $IDX - 1 ))
echo "linkfarmed $nb files" | tee -a WS/log

View File

@@ -3,27 +3,20 @@
set -e ; set -u
source tools/fonctions.sh
TYPE="mp4"
SEQNAME="$1"
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
TMPIMG=/dev/shm/${SEQNAME}-tmp.png
for frame in $(seq 0 $((NBFRAMES-1)))
do
# figlet -k $frame ; sleep 1
# ralentisseur 20 ; echo "go"
img=$(printf "frames/%s/%05d.png" $SEQNAME $frame)
debut=$(date +%s)
@@ -33,7 +26,7 @@ do
if [ $err != 0 ] ; then
echo "$SEQNAME fail $frame" >> WS/log
mogrify -colorspace gray $img
sleep 6
visual_sleep 12
continue
fi
set -e
@@ -47,7 +40,7 @@ do
-annotate +0+5 "$txt" \
${img}
fin=$(date +%s)
echo ; sleep 1
echo
echo ${SEQNAME} $frame $(( fin - debut )) | \
tee -a WS/mp4.timing
echo ; sleep 3
@@ -55,11 +48,7 @@ done
echo
case $TYPE in
"gif89a") convert -delay 8 -dither none \
-colors 102 frames/* foo.gif ;;
"mp4") ff_encodage $SEQNAME wip-${SEQNAME}.mp4 ;;
esac
ff_encodage $SEQNAME wip-${SEQNAME}.mp4
echo "+------- build of $SEQNAME done"

View File

@@ -5,9 +5,6 @@ set -ue
TMPFILE="/dev/shm/plot-timing.tmp"
IMAGE="timing.png"
echo ; figlet "plot timing" ; echo
wc WS/mp4.timing | tee -a WS/log
if [ $# == 1 ]
then
sequence=$1
@@ -15,7 +12,10 @@ else
sequence="escadrille"
fi
grep $sequence WS/mp4.timing | tail -3600 | 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 { \
nbrames=360; \
for (foo=0; foo<nbrames; foo++) { \

View File

@@ -19,11 +19,11 @@ object { Le_Decor }
#declare TrX = 1.34 * sqrt(NormClock);
#declare TrX = 1.84 * sqrt(NormClock);
#declare TrY = 0.90 + (3.5 * Cos_01(NormClock));
#declare TrZ = 9.999 * sqrt(NormClock);
#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 z*9.1 translate <5, 3, -8> }