Compare commits

..

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

34 changed files with 476 additions and 377 deletions

6
.gitignore vendored
View File

@ -1,10 +1,4 @@
*.png *.png
tmp/*.png
*.gif
*.pov-state *.pov-state
tmp/*.pov-state
MANIFEST
tarball

View File

@ -1,16 +1,16 @@
#-------------------------------------------------------- #--------------------------------------------------------
MOYEN = +w1280 +h1024 MOYEN=+w1280 +h1024
GRAND = +w1600 +h1200 GRAND=+w1600 +h1200
PETIT = +w800 +h600 PETIT=+w800 +h600
DIMS=$(PETIT) DIMS=$(PETIT)
OPTS = +a +q9 -d OPTS = +a +q9 -d
POVRAY = povray POVRAY=povray
# nouveau mars 2021 # nouveau mars 2021
INCS = incs INCS = incs/
# CJPEGOPT=-quality 88 -progressive -dct float -targa # CJPEGOPT=-quality 88 -progressive -dct float -targa
CJPEGOPT = -progressive -dct float -quality 88 CJPEGOPT = -progressive -dct float -quality 88
@ -19,26 +19,18 @@ PNGOPT = -interlace -compression 9 -text png.txt
all: loco.png parking.png corail.png train.png essai.png \ all: loco.png parking.png corail.png train.png essai.png \
inside.png benne.png electric.png truc.png wagons.png \ inside.png benne.png electric.png truc.png wagons.png \
ridelles.png rotonde.png grue.png \ ridelles.png rotonde.png grue.png \
citerne.png voiture.png gare.png citerne.png
GLOBDEPS=${INCS}/train.inc ${INCS}/poteaux.inc \ GLOBDEPS=${INCS}/train.inc ${INCS}/poteaux.inc \
${INCS}/electric.inc ${INCS}/voiture.inc \
${INCS}/rails.inc ${INCS}/grue.inc ${INCS}/ridelles.inc \ ${INCS}/rails.inc ${INCS}/grue.inc ${INCS}/ridelles.inc \
${INCS}/instruments.inc \ ${INCS}/citerne.inc \
${INCS}/citerne.inc ${INCS}/benne.inc \ ${INCS}/constantes.inc \
${INCS}/constantes.inc ${INCS}/locomotive.inc \
${INCS}/enseigne.inc \
picz/plancher.png picz/cadran.png \
contexte.inc monde.inc contexte.inc monde.inc
#-------------------------------------------------------- #--------------------------------------------------------
essai.png: essai.pov Makefile $(GLOBDEPS) essai.png: essai.pov Makefile $(GLOBDEPS)
$(POVRAY) +Iessai $(DIMS) $(OPTS) $(POVRAY) +Iessai +Oessai $(DIMS) $(OPTS)
foo.gif: Makefile essai.png voiture.png
convert -delay 20 \
voiture.png essai.png foo.gif
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# #
@ -48,28 +40,31 @@ foo.gif: Makefile essai.png voiture.png
rotonde.png: rotonde.pov Makefile $(GLOBDEPS) rotonde.png: rotonde.pov Makefile $(GLOBDEPS)
$(POVRAY) +Irotonde $(DIMS) $(OPTS) +v $(POVRAY) +Irotonde $(DIMS) $(OPTS) +v
#-----------------------------------------------------------------------
parking.png: parking.pov Makefile $(GLOBDEPS) parking.png: parking.pov Makefile $(GLOBDEPS)
$(POVRAY) +Iparking $(DIMS) $(OPTS) +v $(POVRAY) +Iparking $(DIMS) $(OPTS) +v
wagons.png: wagons.pov $(GLOBDEPS) Makefile
$(POVRAY) +Iwagons $(DIMS) $(OPTS) +v
gare.png: gare.pov $(GLOBDEPS) Makefile
$(POVRAY) +Igare $(DIMS) $(OPTS) +v
#-----------------------------------------------------------------------
loco.png: loco.pov ${GLOBDEPS} Makefile loco.png: loco.pov ${GLOBDEPS} Makefile
$(POVRAY) +Iloco $(DIMS) $(OPTS) +v $(POVRAY) +Iloco $(DIMS) $(OPTS) +v
train.png: train.pov ${GLOBDEPS} Makefile train.png: train.pov ${DEPS} Makefile
$(POVRAY) +Itrain $(DIMS) $(OPTS) +v $(POVRAY) +Itrain $(DIMS) $(OPTS) +v
corail.png: corail.pov Makefile $(GLOBDEPS) corail.png: corail.pov Makefile $(GLOBDEPS)
$(POVRAY) +Icorail $(DIMS) $(OPTS) +v $(POVRAY) +Icorail $(DIMS) $(OPTS) +v
gare.tga: gare.pov gare.inc plancher.tga plancher.inc \
enseigne.inc Makefile
$(POVRAY) +Igare +FT $(DIMS) $(OPTS) +v
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
wagons.png: wagons.pov $(GLOBDEPS) Makefile
$(POVRAY) +Iwagons $(DIMS) $(OPTS) +v
inside.png: inside.pov $(GLOBDEPS) Makefile inside.png: inside.pov $(GLOBDEPS) Makefile
$(POVRAY) +Iinside $(DIMS) $(OPTS) +v $(POVRAY) +Iinside $(DIMS) $(OPTS) +v
@ -94,12 +89,12 @@ grue.png: grue.pov $(GLOBDEPS) Makefile
#-------------------------------------------------------- #--------------------------------------------------------
# les trucs en travaux # les trucs en travaux
voiture.png: voiture.pov $(GLOBDEPS) Makefile tmp/voiture.tga: voiture.inc voiture.pov $(GLOBDEPS)
$(POVRAY) +Ivoiture $(DIMS) $(OPTS) +v $(POVRAY) +Ivoiture +FT +Otmp/ $(DIMS) $(OPTS) +v
#-------------------------------------------------------- #--------------------------------------------------------
SRCFILES = *.inc incs/*.inc *.pov *.txt Makefile tools/*.sh SRCFILES = *.inc *.pov *.txt Makefile *.sh
lines: lines:
wc $(SRCFILES) | sort -n wc $(SRCFILES) | sort -n
@ -108,7 +103,7 @@ tarball: $(SRCFILES)
ls $^ > MANIFEST ; \ ls $^ > MANIFEST ; \
( cd .. ; \ ( cd .. ; \
tar zcvf jouets-tth.tar.gz \ tar zcvf jouets-tth.tar.gz \
`sed 's/^/PovJouets\//' PovJouets/MANIFEST` ) `sed 's/^/Jouets\//' Jouets/MANIFEST` )
date >> tarball date >> tarball
#-------------------------------------------------------- #--------------------------------------------------------

View File

@ -5,7 +5,10 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -26,10 +29,10 @@ object { Wagon_Benne translate y*2 }
camera camera
{ {
location <35.5, 23, 40> location <35.5, 13, 20>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 6, 0> look_at <0, 6, 0>
angle ANGLE_CAM angle 51
} }
light_source { <90, 131, 190> color White } light_source { <90, 131, 190> color White }

View File

@ -1,9 +1,16 @@
/* /*
* une citerne pour transporter le pinard
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc"
#include "colors.inc"
#include "metals.inc"
global_settings {
ambient_light Gray15
assumed_gamma 1.0 /* pour povray 3.7 */
}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -17,14 +24,30 @@ object { Wagon_Citerne translate y*2 }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "monde.inc" #include "plancher.inc"
object { Plancher_0 scale <.5, 1, .5> }
sky_sphere {
pigment
{
gradient x
color_map
{
[0 color Green]
[0.33 color Gray30 ]
[1 color Blue]
}
}
scale 0.5
translate -1
}
camera camera
{ {
location <46, 13, -41> location <36, 13, -11>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 5.8, 0> look_at <0, 5.8, 0>
angle ANGLE_CAM angle 61
} }
light_source { <290, 131, -190> color White } light_source { <290, 131, -190> color White }

View File

@ -2,32 +2,4 @@
* contexte.inc * contexte.inc
*/ */
global_settings { assumed_gamma 1.0 }
/*------------------------------------------------------------------*/
/*
* essential system includes
*/
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/
#declare ANGLE_CAM = 33;
/*------------------------------------------------------------------*/
/*
* outils de mise au point (smart tools)
*/
#declare Repere = object
{
#local DA = 5;
#local DB = DA * 5;
union {
cylinder { <-DA, 0, 0>, <100, 0, 0>, 0.1 pigment { color Red } }
cylinder { <0, -DA, 0>, <0, 100, 0>, 0.1 pigment { color Green } }
cylinder { <0, 0, -DA>, <0, 0, 100>, 0.1 pigment { color Blue } }
}
}
/*------------------------------------------------------------------*/

View File

@ -6,11 +6,39 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
plane {
y, 0
pigment
{
brick Gray35, rgb<0.50, 0.40, 0.20>
rotate z*90
}
}
#include "monde.inc" sky_sphere {
pigment
{
gradient y
color_map
{
[0 color Khaki]
[0.2 color <0 , .1, .2>]
[0.5 color <0.2 , 0, 0>]
[0.6 color <0 , .2, .1>]
[1 color Khaki]
}
turbulence 2.5
}
rotate 50
scale 2
}
#include "incs/train.inc" #include "incs/train.inc"
#include "incs/rails.inc" #include "incs/rails.inc"
@ -39,10 +67,10 @@ union
camera camera
{ {
location <38, 10, -45> location <18, 10, -45>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 7, 0> look_at <0, 6, 0>
angle ANGLE_CAM angle 62
} }
light_source { <550, 725, -900> color Gray60 } light_source { <550, 725, -900> color Gray60 }

View File

@ -5,8 +5,13 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc"
global_settings {
assumed_gamma 1.0 /* pour povray 3.7 */
}
#include "colors.inc"
#include "metals.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -27,13 +32,13 @@ union
camera camera
{ {
right x*image_width/image_height right x*image_width/image_height
location <39, 11.1, -44> location <11, 11.1, -54>
look_at <0, 8, 0> look_at <0, 8, -10>
angle ANGLE_CAM angle 38
} }
light_source { <17, 8, -54> color Gray80 } light_source { <7, 8, -54> color Gray80 }
// light_source { <150, 130, -150> color Green } light_source { <150, 130, -150> color Green }
light_source { <270, 130, 250> color Gray50 } light_source { <270, 130, 250> color Gray50 }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/

View File

@ -1,10 +1,11 @@
/* /*
essai.pov -- un fichier de test. un fichier de test.
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc" #include "metals.inc"
#include "incs/train.inc" #include "incs/train.inc"
@ -12,17 +13,18 @@
#include "incs/benne.inc" #include "incs/benne.inc"
#include "incs/grue.inc" #include "incs/grue.inc"
// object { Boogie } object { Boogie }
object { Grande_Roue }
camera { camera {
location <5.5, 15, 20> location <15.5, 8, 9>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 3, 0> look_at <0, 0, 0>
angle ANGLE_CAM angle 51
} }
object { Repere } cylinder { <-100, 0, 0>, <100, 0, 0>, 0.1 pigment { color Red } }
cylinder { <0, -100, 0>, <0, 100, 0>, 0.1 pigment { color Green } }
cylinder { <0, 0, -100>, <0, 0, 100>, 0.1 pigment { color Blue } }
light_source { <90, 131, 190> color White } light_source { <90, 131, 190> color White }
light_source { <90, 111, 250> color White } light_source { <90, 111, 250> color White }

View File

@ -1,32 +0,0 @@
/*
* UN TRAIN SANS GARE ?
* NON !
*
*
*/
#version 3.7;
#include "contexte.inc"
/*------------------------------------------------------------------*/
// #include "incs/plancher.inc"
#include "incs/decor.inc"
#include "incs/gare.inc"
#include "incs/rails.inc"
object { Gare }
/*------------------------------------------------------------------*/
camera
{
location <320, 490, -1400>
look_at <0, 460, 0>
}
light_source { <1650, 878, -850> color White }
light_source { <930, 598, -1350> color Yellow }
/*------------------------------------------------------------------*/

View File

@ -1,14 +1,42 @@
/* /*
* un gros chantier, vraiment gros (cTMr) *
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "monde.inc" plane {
y, 0
pigment
{
brick Gray50, rgb<0.10, 0.60, 0.30>
rotate z*90
scale 3
}
}
sky_sphere {
pigment
{
gradient y
color_map
{
[0.2 color <0, .1, .2>]
[0.6 color <0, .3, .1>]
[0.9 color <0, .2, .3>]
}
turbulence 29
}
rotate 40
scale 1.5
}
#include "incs/train.inc" #include "incs/train.inc"
#include "incs/rails.inc" #include "incs/rails.inc"

View File

@ -94,7 +94,7 @@ texture {
union union
{ {
object { Base_Courte } object { Base_Courte }
object { Petite_Benne translate y*0.55 } object { Petite_Benne translate y*0.5 }
object { Support_Benne translate z*-11 } object { Support_Benne translate z*-11 }
object { Support_Benne translate z* 11 } object { Support_Benne translate z* 11 }
object { Piston_Benne } object { Piston_Benne }

View File

@ -8,16 +8,16 @@
#declare Base_Loco_Electric = object #declare Base_Loco_Electric = object
{ {
#local DYR = 3; union
union { {
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, DYR, -12> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, -12> }
object { Petite_Roue translate < 5.5, DYR, -12> } object { Petite_Roue translate < 5.5, 0, -12> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, DYR, -5> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, -5> }
object { Petite_Roue translate < 5.5, DYR, -5> } object { Petite_Roue translate < 5.5, 0, -5> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, DYR, 5> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, 5> }
object { Petite_Roue translate < 5.5, DYR, 5> } object { Petite_Roue translate < 5.5, 0, 5> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, DYR, 12> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, 12> }
object { Petite_Roue translate < 5.5, DYR, 12> } object { Petite_Roue translate < 5.5, 0, 12> }
} }
} }

View File

@ -1,6 +1,5 @@
/* /*
* see 'gare.inc' for usage */
*/
#include "chars.inc" #include "chars.inc"
@ -8,17 +7,46 @@
{ {
union union
{ {
object { char_H translate x*-27.5 } object {
object { char_E translate x*-22.5 } char_H
object { char_L translate x*-17.5 } translate x*-27.5
object { char_L translate x*-12.5 } }
object { char_O translate x*-7.5 } object {
char_E
object { char_W translate x*2.5 } translate x*-22.5
object { char_O translate x*7.5 } }
object { char_R translate x*12.5 } object {
object { char_L translate x*17.5 } char_L
object { char_D translate x*22.5 } translate x*-17.5
}
object {
char_L
translate x*-12.5
}
object {
char_O
translate x*-7.5
}
object {
char_W
translate x*2.5
}
object {
char_O
translate x*7.5
}
object {
char_R
translate x*12.5
}
object {
char_L
translate x*17.5
}
object {
char_D
translate x*22.5
}
} }
texture { PinkAlabaster scale 3 } texture { PinkAlabaster scale 3 }
} }

View File

@ -33,9 +33,9 @@ pigment { color White }
finish { phong 0.4 } finish { phong 0.4 }
} }
#include "incs/enseigne.inc" #include "decor.inc"
#include "enseigne.inc"
#include "rails.inc"
#declare Gare = object #declare Gare = object
{ {

View File

@ -12,7 +12,7 @@
#ifdef (Jouets_Instruments) #ifdef (Jouets_Instruments)
// on fait quedalle // on fait quedalle
#warning "*** instruments deja inclus ***\r\n" #debug "instruments deja inclus\r\n"
#else #else
#declare Jouets_Instruments = version; #declare Jouets_Instruments = version;

View File

@ -10,19 +10,17 @@
#declare Base_Loco_Vapeur = object #declare Base_Loco_Vapeur = object
{ {
#local HGR = 4;
#local HPR = 3;
union union
{ {
object { Chassis_Long } object { Chassis_Long }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HPR, -13> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, -13> }
object { Petite_Roue translate < 5.5, HPR, -13> } object { Petite_Roue translate < 5.5, 0, -13> }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HGR, -5> } object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, -5> }
object { Grande_Roue translate < 5.5, HGR, -5> } object { Grande_Roue translate < 5.5, 0, -5> }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HGR, 5> } object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, 5> }
object { Grande_Roue translate < 5.5, HGR, 5> } object { Grande_Roue translate < 5.5, 0, 5> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HPR, 13> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, 13> }
object { Petite_Roue translate < 5.5, HPR, 13> } object { Petite_Roue translate < 5.5, 0, 13> }
} }
} }
@ -45,10 +43,8 @@ union {
sphere { < 3.3, -2.75, -16.5>, .6 } sphere { < 3.3, -2.75, -16.5>, .6 }
sphere { < 3.3, -2.75, -1>, .6 } sphere { < 3.3, -2.75, -1>, .6 }
} }
texture { pigment { color Gray60 }
pigment { color Gray60 } finish { phong 0.5 }
finish { phong 0.5 }
}
translate y*10 translate y*10
} }
@ -63,7 +59,7 @@ difference {
cylinder { <0, 3, -8>, <0, 6.2, -8>, .95 } cylinder { <0, 3, -8>, <0, 6.2, -8>, .95 }
} }
texture { texture {
pigment { color Gray30 } pigment { color Gray40 }
finish { phong 0.65 } finish { phong 0.65 }
} }
translate y*10 translate y*10

View File

@ -6,8 +6,6 @@
#include "woods.inc" #include "woods.inc"
// -----------------------------------------------------------------
#declare Poteau_0 = object #declare Poteau_0 = object
{ {
union union
@ -24,8 +22,8 @@ texture { New_Penny scale 0.3 }
{ {
union union
{ {
box { <-1, 0, -1>, <-0.08, 1.6, 1.5> } box { <-1, 0, -1>, <-0.08, 1.6, 1> }
box { <0.08, 0, -1.5>, <1, 1.6, 1> } box { <0.08, 0, -1>, <1, 1.6, 1> }
} }
texture texture
{ {
@ -39,8 +37,8 @@ texture
union union
{ {
cylinder { <0, 0, 0>, <0, 20, 0>, 0.42 } cylinder { <0, 0, 0>, <0, 20, 0>, 0.42 }
cone { <0, 20, 0>, 0.64, <0, 21, 0>, 0.21 } cone { <0, 20, 0>, 0.64, <0, 23, 0>, 0.21 }
cylinder { <-4, 19, 0>, <4, 19, 0>, 0.20 } cylinder { <-2, 19, 0>, <2, 19, 0>, 0.20 }
} }
texture { T_Wood12 rotate x*90 scale 3 } texture { T_Wood12 rotate x*90 scale 3 }
} }

View File

@ -1,75 +1,62 @@
/* /*
* des éléments du petit train * un petit train
* --------------------------- * --------------
*
* pas la peine de chercher la benne ici, elle est partie
* dans son fichier 'benne.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 }
}
//-----------------------------------------------------------------
#declare Corps_Grande_Roue = object #declare Corps_Grande_Roue = object
{ {
difference { difference {
union { union {
cylinder { < 0, 0, 0>, <0.8, 0, 0>, 4 } cylinder { <-1, 0, 0>, <1, 0, 0>, 4 }
cylinder { <-0.5, 0, 0>, <0, 0, 0>, 4.3 } cylinder { <-0.5, 0, 0>, <0, 0, 0>, 4.3 }
} }
cylinder { <-1.2, 0, 0> <-0.6, 0, 0>, 2.8 } cylinder { <-1.2, 0, 0> <-0.6, 0, 0>, 2.8 }
cylinder { < 1.2, 0, 0> < 0.6, 0, 0>, 3.2 } cylinder { < 1.2, 0, 0> < 0.6, 0, 0>, 3.2 }
#declare foo = 0; #declare foo = 0;
#while (foo < 360) #while (foo < 360)
#local R = 2.2; #declare xx = sin(radians(foo))*2.0;
#declare xx = sin(radians(foo))*R; #declare yy = cos(radians(foo))*2.0;
#declare yy = cos(radians(foo))*R;
cylinder { <-2, xx, yy>, <2, xx, yy>, 0.56 } cylinder { <-2, xx, yy>, <2, xx, yy>, 0.56 }
#declare foo = foo + 36; #declare foo = foo + 45;
#end #end
} }
texture { Texture_Roues } translate y*4
pigment { color LightSteelBlue }
finish { phong 0.7 }
} }
//-----------------------------------------------------------------
#declare Corps_Petite_Roue = object #declare Corps_Petite_Roue = object
{ {
difference { difference {
union { union {
cylinder { < 0, 0, 0>, <0.8, 0, 0>, 3 } cylinder { < 0, 0, 0>, <1, 0, 0>, 3 }
cylinder { <-0.5, 0, 0>, <0, 0, 0>, 3.35 } cylinder { <-1, 0, 0>, <0, 0, 0>, 3.3 }
} }
cylinder { <-1.4, 0, 0> <-0.6, 0, 0>, 1.7 } cylinder { <-1.4, 0, 0> <-0.6, 0, 0>, 1.7 }
cylinder { < 1.4, 0, 0> < 0.6, 0, 0>, 1.7 } cylinder { < 1.4, 0, 0> < 0.6, 0, 0>, 1.7 }
#declare foo = 0; #declare foo = 0;
#while (foo < 360) #while (foo < 360)
#declare xx = sin(radians(foo))*2.29; #declare xx = sin(radians(foo))*2.31;
#declare yy = cos(radians(foo))*2.29; #declare yy = cos(radians(foo))*2.31;
sphere { <1.1, xx, yy>, 0.44 } sphere { <1.1, xx, yy>, 0.42 }
#declare foo = foo + 36; #declare foo = foo + 36;
#end #end
} }
texture { Texture_Roues } translate y*3
pigment { color LightSteelBlue }
finish { phong 0.7 }
} }
//-----------------------------------------------------------------
#declare Moyeu = object #declare Moyeu = object
{ {
union { union {
@ -82,13 +69,11 @@ union {
texture { T_Chrome_2C } texture { T_Chrome_2C }
} }
//-----------------------------------------------------------------
#declare Petite_Roue = object #declare Petite_Roue = object
{ {
union { union {
object { Corps_Petite_Roue } object { Corps_Petite_Roue }
object { Moyeu translate <0.95, 0, 0> } object { Moyeu translate <0.95, 3, 0> }
} }
} }
@ -96,7 +81,7 @@ union {
{ {
union { union {
object { Corps_Grande_Roue } object { Corps_Grande_Roue }
object { Moyeu translate <0.95, 0, 0> } object { Moyeu translate <0.95, 4, 0> }
} }
} }
@ -109,7 +94,10 @@ union {
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
texture { Texture_Chassis } texture {
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
} }
#declare Chassis_Long = object #declare Chassis_Long = object
@ -119,7 +107,10 @@ union {
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
texture { Texture_Chassis } texture {
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------
@ -127,23 +118,22 @@ texture { Texture_Chassis }
#declare Chassis_Boogie = object #declare Chassis_Boogie = object
{ {
union { union {
box { <-3.85, 0, -3>, <3.85, 1.6, 3> } box { <-3.85, 0, -3>, <3.85, 2, 3> }
cylinder { <0, 1, 0>, <0, 4, 0>, 1.5 } cylinder { <0, 1, 0>, <0, 4, 0>, 2 }
} }
translate y*2 translate y*2
pigment { color Gray30 } pigment { color Blue }
} }
#declare Boogie = object #declare Boogie = object
{ {
#local HR = 3;
union union
{ {
object { Chassis_Boogie } object { Chassis_Boogie }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HR, -3.5> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, -3.5> }
object { Petite_Roue translate < 5.5, HR, -3.5> } object { Petite_Roue translate < 5.5, 0, -3.5> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HR, 3.5> } object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, 3.5> }
object { Petite_Roue translate < 5.5, HR, 3.5> } object { Petite_Roue translate < 5.5, 0, 3.5> }
} }
} }
@ -151,13 +141,13 @@ union
#declare Base_Courte = object #declare Base_Courte = object
{ {
#local HR = 4; union
union { {
object { Chassis_Court } object { Chassis_Court }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HR, -8> } object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, -8> }
object { Grande_Roue translate < 5.5, HR, -8> } object { Grande_Roue translate < 5.5, 0, -8> }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HR, 8> } object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, 8> }
object { Grande_Roue translate < 5.5, HR, 8> } object { Grande_Roue translate < 5.5, 0, 8> }
} }
} }

View File

@ -6,11 +6,36 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "monde.inc" sky_sphere {
pigment
{
gradient y
color_map
{
[0 color Gray75]
[1 color Blue]
}
}
scale 4
translate -1
rotate x*60
}
plane {
y, 0
pigment
{
brick Gray35, rgb<0.50, 0.40, 0.30>
rotate z*90
}
}
#include "incs/train.inc" #include "incs/train.inc"
#include "incs/corail.inc" #include "incs/corail.inc"

View File

@ -4,11 +4,49 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc"
#include "colors.inc"
#include "metals.inc"
global_settings {
ambient_light <0.18, 0.25, 0.35>
assumed_gamma 1.0 /* pour povray 3.7 */
}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
plane {
y, 0
pigment {
image_map { png "picz/plancher.png" }
rotate x*90
translate <-0.5, 0, -0.5>
scale <42, 1, 42>
}
normal {
dents 0.3
scale 0.3
}
}
#include "monde.inc" sky_sphere {
pigment {
gradient y
color_map
{
[0 color Khaki]
[0.4 color DarkGreen]
[0.5 color Blue]
[0.6 color LightBlue]
[1 color Khaki]
}
turbulence 0.42*2
}
rotate 70
scale 0.3123
translate -1
}
#include "incs/rails.inc" #include "incs/rails.inc"
#include "incs/train.inc" #include "incs/train.inc"
@ -34,10 +72,10 @@ union {
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
camera { camera {
location <-72, 17.5, 32> location <-42, 17.5, 32>
right image_width/image_height*x right image_width/image_height*x
look_at <5, 9.7, 18> look_at <5, 9.7, 18>
angle ANGLE_CAM angle 42
} }
light_source { <150, 118, -150> color Gray70 } light_source { <150, 118, -150> color Gray70 }

View File

@ -4,15 +4,15 @@
*/ */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
cylinder { plane {
<0, -0.2, 0>, 0, 400 y, 0
pigment { pigment {
image_map { image_map {
png "picz/plancher.png" interpolate 2 png "picz/plancher.png" interpolate 2
} }
rotate x*90 rotate x*90
translate <-0.5, 0, -0.5> translate <-0.5, 0, -0.5>
scale <250, 1, 250> scale <50, 1, 50>
} }
} }
@ -24,13 +24,13 @@ sky_sphere {
{ {
[0 color Khaki ] [0 color Khaki ]
[0.2 color Gray20 ] [0.2 color Gray20 ]
[0.5 color Blue ]
[0.87 color LightBlue ] [0.87 color LightBlue ]
[1 color Khaki ] [1 color Khaki ]
} }
turbulence 0.25
} }
rotate 50 rotate 50
scale 0.15 scale 0.05
translate -1 translate -1
} }

View File

@ -1,13 +0,0 @@
TODO
====
[ ] Rendre le Makefile pilotable depuis le shell
[ ] Tester le module à partir d'un .INI de Povray
[ ] Restructurer l'arborescence de la construction
[ ] Définir un jeu de textures spécifique
[ ] Préparer le concept de "mise en cadre"

View File

@ -1,15 +1,45 @@
/* /*
* Les jouets de tTh - 2021 *
* pour plus de details: oulala@chez.com * pour plus de details: oulala@chez.com
* *
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "monde.inc" disc {
<0, 0, 0>, y, 100
pigment
{
brick Gray45, rgb<0.81, 0.42, 0.40>
rotate z*90
}
scale 2
rotate y*12
}
sky_sphere {
pigment
{
gradient y
color_map
{
[0 color Black]
[0.33 color <0.6, 0.3, 0.5> ]
[0.44 color <0.6, 0.3, 0.1> ]
[0.66 color Blue]
[1 color Black]
}
turbulence 0.92
}
scale 0.82
rotate 42
}
#include "incs/train.inc" #include "incs/train.inc"
#include "incs/locomotive.inc" #include "incs/locomotive.inc"
@ -69,7 +99,7 @@ camera
location <44, 4, -110> location <44, 4, -110>
right image_width/image_height*x right image_width/image_height*x
look_at <10, 1.9, 0> look_at <10, 1.9, 0>
angle ANGLE_CAM angle 62
} }
light_source { <150, 78, -250> color Gray20 } light_source { <150, 78, -250> color Gray20 }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -9,7 +9,10 @@
plane { plane {
y, 0 y, 0
pigment { pigment {
image_map { png "picz/plancher.png" interpolate 4 } image_map
{
png "picz/plancher.png" interpolate 4
}
rotate x*90 rotate x*90
translate <-0.5, 0, -0.5> translate <-0.5, 0, -0.5>
scale <30, 1, 30> scale <30, 1, 30>
@ -22,7 +25,10 @@ plane {
plane { plane {
y, 0 y, 0
pigment { pigment {
image_map { png "picz/plancher.png" interpolate 4 } image_map
{
png "picz/plancher.png" interpolate 4
}
rotate x*90 rotate x*90
translate <-0.5, 0, -0.5> translate <-0.5, 0, -0.5>
scale <30, 1, 30> scale <30, 1, 30>

4
plop.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
make targa
make -j 2 all

View File

@ -1,5 +1,14 @@
#version 3.7; #version 3.7;
#include "contexte.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
global_settings {
ambient_light Gray15
assumed_gamma 1.0 /* pour povray 3.7 */
}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -24,10 +33,10 @@ camera
location <40, 15, -50> location <40, 15, -50>
right x*image_width/image_height right x*image_width/image_height
look_at <0, 5, 0> look_at <0, 5, 0>
angle ANGLE_CAM angle 42
} }
light_source { < 200, 70, -200> color Gray50 } light_source { <200, 70, -200> color Gray50 }
light_source { <-200, 170, -150> color White } light_source { <-200, 170, -150> color White }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/

View File

@ -1,9 +1,12 @@
/*
* le grand garage des trains
*/
#version 3.7; #version 3.7;
#include "contexte.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
global_settings { ambient_light Yellow }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "incs/poteaux.inc" #include "incs/poteaux.inc"
@ -17,12 +20,22 @@ object { Un_Rail_Droit translate z*-100}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
plane {
y, 0
pigment
{
checker Gray75, rgb<0.81, 0.86, 0.81>
rotate z*90
scale 10
}
}
camera camera
{ {
location <20, 70, 240> location <0, 70, 180>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 24, 0> look_at <0, 0, 0>
angle ANGLE_CAM angle 50
} }
light_source { <142, 500, 500> color White } light_source { <142, 500, 500> color White }

View File

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

View File

@ -1,10 +0,0 @@
#!/bin/bash
printf "==== %s ( %s ) ===\n" $0 $1
VALUE=$(( $RANDOM % 4096 ))
printf "random value = %03xH\n" ${VALUE}

View File

@ -1,57 +1,58 @@
/* /*
* *
* pour plus de details: * pour plus de details: oulala@chez.com
* http://la.buvette.org/POV/jouets/
* *
*/ */
#version 3.7; #include "colors.inc"
#include "contexte.inc" #include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include "monde.inc" global_settings { ambient_light Gray10 }
#include "plancher.inc"
object { Plancher_0 rotate y*3 }
#declare DarkKhaki = color red 0.523529 green 0.523529 blue 0.272549;
sky_sphere {
pigment
{
gradient y
color_map
{
[0 color DarkKhaki]
[0.3 color Blue]
[1 color LightBlue]
}
turbulence 0.8
}
rotate 55
translate -1
}
#include "incs/train.inc"
#include "incs/electric.inc"
#include "incs/rails.inc" #include "incs/rails.inc"
#include "incs/train.inc"
#include "incs/benne.inc" #include "incs/benne.inc"
#include "incs/citerne.inc" #include "incs/citerne.inc"
#include "incs/ridelles.inc" #include "incs/ridelles.inc"
#include "incs/corail.inc" #include "incs/corail.inc"
#include "incs/locomotive.inc" #include "incs/locomotive.inc"
#declare Trois_rails = object union
{ {
union {
object { Un_Rail_Droit } object { Un_Rail_Droit }
object { Un_Rail_Droit translate z*-100 } object { Un_Rail_Droit translate z*-100 }
object { Un_Rail_Droit translate z* 100 } object { Un_Rail_Droit translate z* 100 }
}
}
#declare Train_Electric = object object { Locomotive_Vapeur translate <0, 2, -56> }
{ object { Wagon_Citerne translate <0, 2, -25> }
union { object { Wagon_Benne translate <0, 2, 2> }
object { Locomotive_Electric translate <0, 2, -10> } object { Wagon_Corail translate <0, 2, 39> }
object { Wagon_Corail translate <0, 2, 29> } object { Wagon_Ridelles translate <0, 2, 78> }
}
}
union
{
object { Trois_rails }
object { Locomotive_Vapeur translate <0, 2, -52> }
object { Wagon_Citerne translate <0, 2, -21> }
object { Wagon_Benne translate <0, 2, 6> }
object { Wagon_Ridelles translate <0, 2, 41> }
#local XS = 60;
object { Trois_rails translate x*XS }
#local DZ = 60 - (clock*33);
object { Train_Electric translate <XS, 0, DZ> }
} }
#include "incs/poteaux.inc" #include "incs/poteaux.inc"
@ -66,10 +67,10 @@ union
camera camera
{ {
location <260, 38, 25> location <130, 18, 15>
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 70
} }
light_source { <150, 98, -150> color Orange } light_source { <150, 98, -150> color Orange }

View File

@ -3,7 +3,11 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -18,12 +22,24 @@ object { Bord_Fenetre translate y*7.5 }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
background { color rgb <0.7, 0.7, 0.9999> }
plane {
y, 0
pigment
{
checker Gray75, rgb<0.71, 0.96, 0.81>
rotate z*90
scale 10
}
}
camera camera
{ {
location <-15, 11.333, 35> location <-15, 11.333, 35>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 9, 0> look_at <0, 9, 0>
angle ANGLE_CAM angle 42
} }
light_source { <-50, 17, -50> color White } light_source { <-50, 17, -50> color White }

View File

@ -1,28 +0,0 @@
/*
quelques elements des voitures
*/
#version 3.7;
#include "contexte.inc"
#include "metals.inc"
#include "incs/train.inc"
#include "incs/rails.inc"
#include "incs/benne.inc"
#include "incs/grue.inc"
// #include "decor.inc"
object { Boogie }
camera {
location <25.5, 15, 22>
look_at <0, 2, 0>
angle ANGLE_CAM
}
object { Repere }
light_source { <90, 131, 190> color Cyan }
light_source { <90, 111, 250> color Magenta }
/*------------------------------------------------------------------*/

View File

@ -10,7 +10,11 @@
*/ */
#version 3.7; #version 3.7;
#include "contexte.inc" global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
@ -34,14 +38,14 @@ object { Poteau_1 translate -z*12 }
camera camera
{ {
location <14, 10, -80> location <12, 10, -50>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 7, 0> look_at <0, 0, 0>
angle ANGLE_CAM angle 42
} }
light_source { <-50, 120, -330> color Gray50 } light_source { <-50, 120, -330> color Gray50 }
light_source { <190, 498, -250> color White } light_source { <190, 498, -250> color White }
light_source { <160, 99, -450> color Yellow } light_source { <160, 99, -250> color Yellow }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/