Compare commits
11 Commits
full-v1
...
b344d0b762
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b344d0b762 | ||
|
|
9962480356 | ||
|
|
8e02e9e466 | ||
|
|
45ac640ba6 | ||
|
|
27891b70dc | ||
|
|
05f40fae75 | ||
|
|
070679ec5b | ||
|
|
1eac9d4cfc | ||
|
|
cf899967ce | ||
|
|
af4f9fc282 | ||
|
|
b9299568f4 |
7
Makefile
7
Makefile
@@ -1,6 +1,7 @@
|
||||
|
||||
DIMS = -W1600 -H1200
|
||||
POVOPT = +q9 +a0.02 -d
|
||||
# POVOPT = +q9 +a0.02 -d
|
||||
POVOPT = +q9 +A -d
|
||||
POVDEP = contexte.inc elements.inc hexabenz.inc \
|
||||
globals.inc datas/hf.png
|
||||
|
||||
@@ -9,7 +10,7 @@ CK=180
|
||||
|
||||
PNG: essai.png scene.png topview.png passage.png \
|
||||
orbite.png hexabenz.png escadrille.png \
|
||||
hexacone.png
|
||||
hexacone.png remote.png
|
||||
|
||||
|
||||
topview.png: topview.pov Makefile $(POVDEP)
|
||||
@@ -36,4 +37,6 @@ scene.png: scene.pov Makefile $(POVDEP)
|
||||
escadrille.png: escadrille.pov Makefile $(POVDEP)
|
||||
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
|
||||
|
||||
remote.png: remote.pov Makefile $(POVDEP)
|
||||
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
|
||||
|
||||
|
||||
90
contexte.inc
90
contexte.inc
@@ -6,6 +6,66 @@
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#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 Gray90 }
|
||||
#local Ro = 0.5-rand(Rng1);
|
||||
#if (abs(Ro) < 0.01)
|
||||
#local Ro = Ro * 10;
|
||||
#end
|
||||
rotate y*(0.5-rand(Rng1)) * clock
|
||||
}
|
||||
light_source { y*0.10
|
||||
rgb <0.8, 0.9, 0.999999999>
|
||||
fade_distance 3.96
|
||||
fade_power 1.55
|
||||
}
|
||||
}
|
||||
#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 Les_GyroPhares ()
|
||||
union {
|
||||
#local E = SzSol * 0.485;
|
||||
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> }
|
||||
#undef E
|
||||
}
|
||||
#end
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare Rhxba = 0.30;
|
||||
#declare R2hxba = Rhxba * 0.48;
|
||||
|
||||
@@ -20,6 +80,7 @@ merge {
|
||||
sphere { 0, R2hxba translate < 0, E, 0> }
|
||||
sphere { 0, R2hxba translate < 0, 0, -E> }
|
||||
sphere { 0, R2hxba translate < 0, 0, E> }
|
||||
#undef E
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +90,13 @@ union {
|
||||
object { HexaBalls
|
||||
texture { Lightning1 scale 0.33 }
|
||||
rotate <clock/3, clock/6, clock/9>
|
||||
translate <5, -1.2+1.01*Cos_010(NormClock), 7>
|
||||
translate <5, -1.1+1.01*Cos_010(NormClock), 7>
|
||||
}
|
||||
|
||||
object { HexaBalls
|
||||
texture { Lightning2 scale 0.56 }
|
||||
// rotate <-clock, clock*0.33333, clock>
|
||||
translate <7, -1+0.89*Cos_010(NormClock), -6>
|
||||
translate <7, -1+0.92*Cos_010(NormClock), -6>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +134,7 @@ height_field {
|
||||
pigment {
|
||||
// color DarkGreen
|
||||
image_map { png "datas/cmap.png" }
|
||||
translate <-.5, 0, -.5>
|
||||
// translate <-.5, 0, -.5>
|
||||
scale <SzSol, 0.98, SzSol>
|
||||
}
|
||||
// normal { bumps 0.035 scale 0.186 }
|
||||
@@ -82,6 +143,16 @@ height_field {
|
||||
}
|
||||
}
|
||||
|
||||
#declare Underground = object
|
||||
{
|
||||
plane { y, -0.80 }
|
||||
texture {
|
||||
pigment { color Gray20 }
|
||||
normal { bumps 0.25 scale 6 }
|
||||
}
|
||||
}
|
||||
// =======================================================
|
||||
|
||||
#declare Repere = object
|
||||
{
|
||||
union {
|
||||
@@ -89,6 +160,7 @@ union {
|
||||
cylinder { 0, <0, 0, 1>, 0.008 pigment { color Blue } }
|
||||
}
|
||||
}
|
||||
// =======================================================
|
||||
|
||||
#declare Les_Lumieres = object
|
||||
{
|
||||
@@ -125,6 +197,14 @@ union {
|
||||
point_at <0, 0.95, -0.22>
|
||||
}
|
||||
#end
|
||||
|
||||
light_source {
|
||||
<-4, 54, -7>
|
||||
colour Yellow*0.76
|
||||
parallel
|
||||
point_at 0
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +220,7 @@ sky_sphere {
|
||||
[ 0.8 color White ]
|
||||
[ 1.0 color Gray10 ]
|
||||
}
|
||||
turbulence 3.14159 + 0.91 * Cos_010(NormClock)
|
||||
turbulence 3.14159 + 0.78 * Cos_010(NormClock)
|
||||
scale 1.804
|
||||
// translate -1
|
||||
}
|
||||
@@ -157,8 +237,10 @@ sky_sphere {
|
||||
{
|
||||
union {
|
||||
object { Le_Sol }
|
||||
object { Underground }
|
||||
object { Les_Bibelots }
|
||||
object { Les_Lumieres }
|
||||
object { Les_GyroPhares () }
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
36
essai.pov
36
essai.pov
@@ -12,42 +12,6 @@
|
||||
#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 ()
|
||||
|
||||
@@ -44,7 +44,7 @@ union {
|
||||
#declare Benz_Tubules = object
|
||||
{
|
||||
merge {
|
||||
#local E = R_Tube * 0.0910;
|
||||
#local E = R_Tube * 0.75;
|
||||
#local R = 0.01;
|
||||
#for (foo, 0, 360, 20)
|
||||
#local Tx = E * sin(radians(foo));
|
||||
|
||||
39
remote.pov
Normal file
39
remote.pov
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* H E X A C O N E - R E M O T E
|
||||
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
|
||||
*/
|
||||
|
||||
#version 3.7;
|
||||
|
||||
#include "globals.inc"
|
||||
|
||||
#include "colors.inc"
|
||||
#include "metals.inc"
|
||||
#include "textures.inc"
|
||||
|
||||
#include "contexte.inc"
|
||||
#include "elements.inc"
|
||||
#include "hexabenz.inc"
|
||||
|
||||
object { Le_Decor }
|
||||
|
||||
// object { HexaCone () rotate z*9.1 translate <5, 3, -8> }
|
||||
object { HexaBenz () translate <-4, 2, -5> }
|
||||
|
||||
// light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> }
|
||||
// object { Repere scale 2 }
|
||||
|
||||
#local DistCam = 147;
|
||||
#local CK = 0.78 * NormClock;
|
||||
#declare CamX = DistCam * sin(CK);
|
||||
#declare CamY = 23;
|
||||
#declare CamZ = DistCam * cos(CK);
|
||||
|
||||
camera {
|
||||
location <CamX, CamY, CamZ>
|
||||
look_at <0, 0, 0>
|
||||
// focal_point <2, 1, 12>
|
||||
// aperture 0.046
|
||||
// blur_samples 30
|
||||
angle 10
|
||||
}
|
||||
9
tools/config.sh
Normal file
9
tools/config.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
Img_Width=1024
|
||||
Img_Height=768
|
||||
|
||||
TEXTCOL="orange"
|
||||
STROKOL="darkblue"
|
||||
|
||||
NBFRAMES=360
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
set -e ; set -u
|
||||
|
||||
source tools/config.sh
|
||||
|
||||
IDX=0
|
||||
SPOOL="frames/Spool"
|
||||
SEQNAME="none"
|
||||
TMP="WS/tmp.png"
|
||||
FONTE="Helvetica-Bold"
|
||||
TEXTCOL="yellow"
|
||||
STROKOL="darkblue"
|
||||
|
||||
source tools/fonctions.sh
|
||||
|
||||
@@ -32,13 +32,24 @@ linkfarm ()
|
||||
{
|
||||
SRC="frames/$1"
|
||||
echo "linkfarm $SRC" | tee -a WS/log
|
||||
|
||||
local INTER="/dev/shm/tmp-intertitre.png"
|
||||
tools/plot-timing.sh $1
|
||||
|
||||
local NBRE=60
|
||||
local NBRE=90
|
||||
|
||||
convert "WS/negatif.png" \
|
||||
-gravity north \
|
||||
-font $FONTE \
|
||||
-pointsize 96 \
|
||||
-kerning 6 \
|
||||
-fill $TEXTCOL \
|
||||
-strokewidth 2 -stroke $STROKOL \
|
||||
-annotate +0+490 "$1" \
|
||||
${INTER}
|
||||
for foo in $(seq 0 $NBRE)
|
||||
do
|
||||
copy_a_file "WS/negatif.png"
|
||||
copy_a_file $INTER
|
||||
done
|
||||
|
||||
for foo in $(seq 0 $NBRE)
|
||||
@@ -61,8 +72,8 @@ faire_le_titre ()
|
||||
{
|
||||
echo "faire le titre"
|
||||
|
||||
local NBRE=180
|
||||
local SRC="frames/passage/00059.png"
|
||||
local NBRE=280
|
||||
local SRC="frames/passage/00099.png"
|
||||
local GRAY="/dev/shm/tmp-titre.png"
|
||||
|
||||
convert -colorspace gray -colors 27 $SRC $GRAY
|
||||
@@ -73,11 +84,11 @@ do
|
||||
convert ${GRAY} \
|
||||
-gravity north \
|
||||
-font $FONTE \
|
||||
-pointsize 172 \
|
||||
-pointsize 146 \
|
||||
-kerning 6 \
|
||||
-fill $TEXTCOL \
|
||||
-strokewidth 3 -stroke $STROKOL \
|
||||
-annotate +0+${Ypos} "HexaCone" \
|
||||
-annotate +0+${Ypos} "HexaCones" \
|
||||
${TMP}
|
||||
# identify ${TMP}
|
||||
copy_a_file ${TMP}
|
||||
@@ -92,10 +103,14 @@ local NBRE=180
|
||||
datetime=$(LANG=fr date -u +"%Y/%m/%d")
|
||||
echo $datetime | tee -a WS/log
|
||||
|
||||
local SRC="frames/escadrille/00299.png"
|
||||
local GRAY="/dev/shm/tmp-titre.png"
|
||||
convert -colorspace gray -colors 27 $SRC $GRAY
|
||||
|
||||
for foo in $(seq 0 $NBRE)
|
||||
do
|
||||
Ypos=$(( foo + 20 ))
|
||||
convert "WS/negatif.png" \
|
||||
convert ${GRAY} \
|
||||
-gravity north \
|
||||
-font $FONTE \
|
||||
-pointsize 86 \
|
||||
@@ -107,7 +122,7 @@ do
|
||||
-pointsize 48 \
|
||||
-strokewidth 1 \
|
||||
-gravity south \
|
||||
-annotate +0+170 "${datetime}" \
|
||||
-annotate +0+140 "${datetime}" \
|
||||
${TMP}
|
||||
# identify ${TMP}
|
||||
copy_a_file ${TMP}
|
||||
@@ -121,7 +136,6 @@ figlet "Link farmer"
|
||||
|
||||
rm -f frames/Spool/*.png
|
||||
|
||||
# tools/plot-timing.sh
|
||||
faire_le_titre
|
||||
|
||||
linkfarm hexabenz
|
||||
@@ -131,7 +145,7 @@ linkfarm topview
|
||||
linkfarm passage
|
||||
linkfarm scene
|
||||
linkfarm orbite
|
||||
|
||||
linkfarm remote
|
||||
linkfarm essai
|
||||
|
||||
tools/plot-timing.sh
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e ; set -u
|
||||
|
||||
source tools/config.sh
|
||||
source tools/fonctions.sh
|
||||
|
||||
SEQNAME="$1"
|
||||
NBFRAMES=360
|
||||
|
||||
|
||||
echo "Running $0 $SEQNAME" >> WS/log
|
||||
|
||||
DIMS="-W1024 -H768"
|
||||
POVOPT="+q9 -a -d ${DIMS} -WT6"
|
||||
DIMS="-W$Img_Width -H$Img_Height"
|
||||
POVOPT="+q9 +A -d ${DIMS} -WT6"
|
||||
echo $POVOPT ; echo ; sleep 2
|
||||
|
||||
TMPIMG=/dev/shm/${SEQNAME}-tmp.png
|
||||
@@ -25,17 +25,17 @@ do
|
||||
err=$?
|
||||
if [ $err != 0 ] ; then
|
||||
echo "$SEQNAME fail $frame" >> WS/log
|
||||
mogrify -colorspace gray $img
|
||||
mogrify -colorspace gray -blur 5x5 $img
|
||||
visual_sleep 12
|
||||
continue
|
||||
fi
|
||||
set -e
|
||||
txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '0' 'o')
|
||||
txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '01' 'ol')
|
||||
# echo $frame $img $txt
|
||||
convert ${TMPIMG} \
|
||||
-font Courier-Bold \
|
||||
-pointsize 18 \
|
||||
-fill Gray80 \
|
||||
-pointsize 16 \
|
||||
-fill ${TEXTCOL} \
|
||||
-gravity south \
|
||||
-annotate +0+5 "$txt" \
|
||||
${img}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
set -ue
|
||||
|
||||
source tools/config.sh
|
||||
|
||||
TMPFILE="/dev/shm/plot-timing.tmp"
|
||||
IMAGE="timing.png"
|
||||
|
||||
@@ -12,13 +14,14 @@ else
|
||||
sequence="escadrille"
|
||||
fi
|
||||
|
||||
echo "plot timing $sequence" | tee -a WS/log
|
||||
# wc WS/mp4.timing | tee -a WS/log
|
||||
# echo "plot timing $sequence" >> WS/log
|
||||
|
||||
grep $sequence WS/mp4.timing | tail -3600 | awk ' \
|
||||
grep $sequence WS/mp4.timing | tail -3600 | awk \
|
||||
-v nbframes=$NBFRAMES \
|
||||
' \
|
||||
BEGIN { \
|
||||
nbrames=360; \
|
||||
for (foo=0; foo<nbrames; foo++) { \
|
||||
# print "nb frames = ", nbframes; \
|
||||
for (foo=0; foo<nbframes; foo++) { \
|
||||
mini[foo] = 666; \
|
||||
maxi[foo] = -42; \
|
||||
count[foo] = 0; \
|
||||
@@ -33,7 +36,7 @@ BEGIN { \
|
||||
} \
|
||||
\
|
||||
END { \
|
||||
for (foo=0; foo<nbrames; foo++) { \
|
||||
for (foo=0; foo<nbframes; foo++) { \
|
||||
if (count[foo] > 0) { \
|
||||
mean = accu[foo] / count[foo]; \
|
||||
printf "%4d %4f %4d %4d\n", foo, mean, \
|
||||
@@ -43,10 +46,10 @@ END { \
|
||||
} \
|
||||
' > $TMPFILE
|
||||
|
||||
# cat -n $TMPFILE | tail # ; exit
|
||||
# head $TMPFILE ; exit
|
||||
|
||||
gnuplot << __EOC__
|
||||
set term png size 1024,768
|
||||
set term png size $Img_Width,$Img_Height
|
||||
set output "timing.png"
|
||||
set grid
|
||||
set xrange [:360]
|
||||
@@ -59,5 +62,5 @@ gnuplot << __EOC__
|
||||
"/dev/shm/plot-timing.tmp" u 1:2 w l lc "#000000" t "moyenne",
|
||||
__EOC__
|
||||
|
||||
convert -negate -colorspace gray -level -33% $IMAGE WS/negatif.png
|
||||
convert -negate -level -33% $IMAGE WS/negatif.png
|
||||
|
||||
|
||||
Reference in New Issue
Block a user