Compare commits

..

No commits in common. "e4df9e129980e517bb88379b42004bcf4d35751d" and "255643e55ad17a6046050aee2c482d717cf1934e" have entirely different histories.

10 changed files with 32 additions and 77 deletions

View File

@ -5,8 +5,3 @@ Un très très vieux projet POVray qui revient dans le triste monde de 2021.
http://la.buvette.org/POV/jouets/ http://la.buvette.org/POV/jouets/
https://git.tetalab.org/tTh/PovJouets https://git.tetalab.org/tTh/PovJouets
## TODO
- bien revoir la hiérarchie des includes
- définir un jeu de textures cohérent

View File

@ -16,18 +16,6 @@ global_settings { assumed_gamma 1.0 }
#declare ANGLE_CAM = 33; #declare ANGLE_CAM = 33;
//---------------------------------------
/*
* deux macros pour des variations plus 'touchy'
*/
#macro Cos_01( X )
(0.5-0.5*cos( 3.141592654 * X))
#end
#macro Cos_010( X )
(0.5-0.5*cos( 2 * 3.141592654 * X))
#end
//---------------------------------------
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
* outils de mise au point (smart tools) * outils de mise au point (smart tools)

View File

@ -18,7 +18,10 @@ union {
cylinder { <0, 4.5, 9.75>, <0, 4.5, 12>, .8 } cylinder { <0, 4.5, 9.75>, <0, 4.5, 12>, .8 }
} }
translate y*6 translate y*6
texture { Vert_Train_1 } texture {
pigment { color Green }
finish { phong 0.5 }
}
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------

View File

@ -3,9 +3,6 @@
* Une citerne de St Chinian * Une citerne de St Chinian
*/ */
//----------------------------------------------------------------- //-----------------------------------------------------------------
#include "incs/constantes.inc"
#declare Diam_Citerne = 4.6; #declare Diam_Citerne = 4.6;
#declare Epp_Cerclage = 0.233; #declare Epp_Cerclage = 0.233;
#declare Diam_Cerclage = (Diam_Citerne+Epp_Cerclage); #declare Diam_Cerclage = (Diam_Citerne+Epp_Cerclage);
@ -43,8 +40,11 @@ union {
} }
} }
scale <1, 0.882, 1> scale <1, 0.882, 1>
translate y*10.7 // ??? translate y*10.7
texture { Rouge_Train_1 } texture {
pigment { color rgb <0.96, 0.25, 0.2> }
finish { phong 0.6 }
}
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------

View File

@ -5,7 +5,7 @@
#ifdef(Jouets_Constantes) #ifdef(Jouets_Constantes)
// do nothing // do nothing
#warning "*** constantes deja definies\n" #error "constantes deja definies\n"
#else #else
#declare Jouets_Constantes=version; #declare Jouets_Constantes=version;
@ -23,36 +23,6 @@
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/* il nous faut quelques textures 'standards' */ /* il nous faut quelques textures 'standards' */
#declare Vert_Train_1 = texture
{
// pour la benne
pigment { color Green }
normal { bumps 0.33 scale 0.42 }
finish { phong 0.5 }
}
#declare Rouge_Train_1 = texture
{
// pour la citerne
pigment { color rgb <0.96, 0.25, 0.2> }
normal { bumps 0.33 scale 0.42 }
finish { phong 0.5 }
}
#declare Texture_Roues = texture
{
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Texture_Chassis = texture
{
pigment { color Yellow }
finish { phong 0.5 ambient 0.4 }
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
#end // #ifdef #end // #ifdef

View File

@ -19,7 +19,7 @@ texture {
pigment { color MediumWood } pigment { color MediumWood }
finish { roughness .83 } finish { roughness .83 }
} }
translate y*5.85 translate y*5.75
} }
/* avant et arriere */ /* avant et arriere */

View File

@ -5,7 +5,17 @@
*/ */
//----------------------------------------------------------------- //-----------------------------------------------------------------
#include "incs/constantes.inc" #declare Texture_Roues = texture
{
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Texture_Chassis = texture
{
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
//----------------------------------------------------------------- //-----------------------------------------------------------------
@ -95,7 +105,7 @@ union {
#declare Chassis_Court = object #declare Chassis_Court = object
{ {
union { union {
box { <-3.5, 0.2, -12>, <3.5, 1.8, 12> } box { <-3.5, 0, -12>, <3.5, 2, 12> }
box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> } box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> }
} }
translate y*4.1 translate y*4.1
@ -105,7 +115,7 @@ texture { Texture_Chassis }
#declare Chassis_Long = object #declare Chassis_Long = object
{ {
union { union {
box { <-3.5, 0.2, -15.5>, <3.5, 1.8, 15.5> } box { <-3.5, 0, -15.5>, <3.5, 2, 15.5> }
box { <-4, 0.5, -16>, <4, 1.5, 16> } box { <-4, 0.5, -16>, <4, 1.5, 16> }
} }
translate y*4.1 translate y*4.1

View File

@ -4,10 +4,8 @@
*/ */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#declare R_monde = 290; /* le rayon du monde */
cylinder { cylinder {
<0, -0.2, 0>, 0, R_monde <0, -0.2, 0>, 0, 400
pigment { pigment {
image_map { image_map {
png "picz/plancher.png" interpolate 2 png "picz/plancher.png" interpolate 2
@ -18,14 +16,6 @@ cylinder {
} }
} }
#for (foo, 0, 360, 1)
#local R2 = R_monde - 1.5;
#local xpos = R2 * sin(radians(foo));
#local zpos = R2 * cos(radians(foo));
cylinder { <0, 0, 0>, <0, 5, 0>, 0.40 pigment { color Blue }
translate <xpos, 0, zpos> }
#end
sky_sphere { sky_sphere {
pigment pigment
{ {

View File

@ -3,8 +3,8 @@
SPOOL="$HOME/TMP" SPOOL="$HOME/TMP"
mkdir "$SPOOL" mkdir "$SPOOL"
NBRE=599 NBRE=279
POVOPT=" -w1280 -h960 +q9 -a -d " POVOPT=" -w768 -h576 +q9 +a -d "
SRCFILE="train.pov" SRCFILE="train.pov"
for idx in $(seq 0 $NBRE) for idx in $(seq 0 $NBRE)
@ -13,7 +13,7 @@ do
outfile=$(printf "%s/%04d.png" $SPOOL $idx) outfile=$(printf "%s/%04d.png" $SPOOL $idx)
horloge=$(echo "$idx / $NBRE" | bc -l) horloge=$(echo "$idx / $NBRE" | bc -l)
printf "%-20s %.4f\n" $outfile $horloge printf "%-20s %.3f\n" $outfile $horloge
povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile} povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile}
@ -21,6 +21,6 @@ done
ffmpeg -nostdin \ ffmpeg -nostdin \
-loglevel error \ -loglevel error \
-y -r 25 -f image2 -i $SPOOL/%04d.png \ -y -r 30 -f image2 -i $SPOOL/%04d.png \
-c:v libx264 -pix_fmt yuv420p \ -c:v libx264 -pix_fmt yuv420p \
$SPOOL/foo.mp4 $SPOOL/foo.mp4

View File

@ -45,13 +45,12 @@ union
object { Locomotive_Vapeur translate <0, 2, -52> } object { Locomotive_Vapeur translate <0, 2, -52> }
object { Wagon_Citerne translate <0, 2, -21> } object { Wagon_Citerne translate <0, 2, -21> }
object { Wagon_Benne translate <0, 2, 6> } object { Wagon_Benne translate <0, 2, 6> }
object { Wagon_Ridelles translate <0, 2, 35> } object { Wagon_Ridelles translate <0, 2, 41> }
#local XS = 60; #local XS = 60;
object { Trois_rails translate x*XS } object { Trois_rails translate x*XS }
#local K = Cos_01(clock); #local DZ = 60 - (clock*33);
#local DZ = 50 - (K * 85);
object { Train_Electric translate <XS, 0, DZ> } object { Train_Electric translate <XS, 0, DZ> }
} }
@ -69,7 +68,7 @@ camera
{ {
location <260, 38, 25> location <260, 38, 25>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 3, -10> look_at <0, 3, 10>
angle ANGLE_CAM angle ANGLE_CAM
} }