Compare commits

...

11 Commits

Author SHA1 Message Date
Tonton Th
4149fa6cc1 randomize des poteaux 2026-06-29 15:59:11 +02:00
Tonton Th
1e11d7316e add a door to the station 2026-06-29 15:58:02 +02:00
Tonton Th
5f45012538 union -> merge 2026-06-29 15:57:27 +02:00
Tonton Th
9414cefdeb ignore vidz 2026-06-29 15:56:38 +02:00
Tonton Th
35f30b7e39 cosmetic 2026-06-27 23:01:40 +02:00
Tonton Th
42995bcad9 oupsy, oupsa 2026-06-27 22:47:07 +02:00
Tonton Th
9d1ceee14b oups... 2026-06-19 13:09:35 +02:00
Tonton Th
38bbd2fbea moare doc... 2026-06-18 02:15:17 +02:00
Tonton Th
996e8f7372 do not version vim swpfiles 2026-06-18 01:39:02 +02:00
Tonton Th
cb0b4aedf1 update ugly vidz maker 2026-06-18 01:05:48 +02:00
Tonton Th
b2a54ecaca Bourtoulots Express 2026-06-17 20:58:01 +02:00
11 changed files with 157 additions and 71 deletions

2
.gitignore vendored
View File

@@ -2,6 +2,8 @@
*.png *.png
tmp/*.png tmp/*.png
*.gif *.gif
*.swp
*.mp4
*.pov-state *.pov-state
tmp/*.pov-state tmp/*.pov-state

78
Jouets.md Normal file
View File

@@ -0,0 +1,78 @@
# Les jouets
Comme pour la plupart de mes projets informatiques, je suis parti
sur une vague idée (dont je n'ai aucun souvenir) et ensuite, je
rajoute de multiples itérations de
[rache](https://la-rache.com/certificat.html#tTh%20des%20Bourtoulots),
alors forcément le code n'est pas très clair tout comme mes intentions
de pseudo-créateur.
Alors, je vais écrire des choses vaguement inutiles afin de vous aider
à ne pas comprendre grand-chose au bouzin. Un peu de technique,
un peu de pensées diverses, un peu d'imaginaire, tout ce qui
fait la vie du poviste néo-rural.
La plupart des choses dont je cause sont dans des fichiers
placés dans le répertoire [incs](./incs/) et vraiment très
mal commentés.
## constantes
*Un peu de sérieux !* Dans ce [fichier](./incs/constantes.inc), on
trouve, pour le moment, essentiellement deux choses :
* Des valeurs numériques pour la géométrie des choses, l'écartement
des rails, la taille des roues...
* Les textures qui servent à donner de pinpantes couleurs à
toutes ces choses plus ou moins bien formées.
## benne
## citerne
## corail
## decor
## electric
## enseigne
Comme nous sommes dans un univers ferriovaire, nous devons clairement
afficher des choses, sur le coté de nos wagons, aux frontons de nos
gares, et sur les dispositifs qui règlent nos vies.
## galerie
## gare
## grue
*Une cinématique extrèmement complexe basé sur une hiérachie de
transformées imbriquées dans une cascade indécente de composants
complexes imbriqués dans un assemblage de ...*
## instruments
Chaque machine a besoin d'un tachymetre, d'un presostat, et d'un
petit affichage qui frétille.
## locomotive
## poteaux
## rails
## ridelles
## rotonde
Il faut bien un endroit où garer ces jolies voitures.
## train
## voiture

View File

@@ -27,7 +27,7 @@ GLOBDEPS=${INCS}/train.inc ${INCS}/poteaux.inc \
${INCS}/instruments.inc ${INCS}/corail.inc \ ${INCS}/instruments.inc ${INCS}/corail.inc \
${INCS}/citerne.inc ${INCS}/benne.inc \ ${INCS}/citerne.inc ${INCS}/benne.inc \
${INCS}/constantes.inc ${INCS}/locomotive.inc \ ${INCS}/constantes.inc ${INCS}/locomotive.inc \
${INCS}/enseigne.inc \ ${INCS}/enseigne.inc ${INCS}/gare.inc \
picz/plancher.png picz/cadran.png \ picz/plancher.png picz/cadran.png \
contexte.inc monde.inc contexte.inc monde.inc

View File

@@ -1,12 +1,21 @@
# PovJouets # PovJouets
Un très très vieux projet POVray qui revient dans le triste C'est un très très vieux
monde de 2021. [projet](http://maison.tth.netlib.re/pov/jouets.html) en POVray qui
Et qui revient en forme pour attaquer **2025** ? revient dans le triste
monde de 2021, un monde que nous essayons de ranger dans un recoin
de nos mémoires, à la rubrique *never again*.
Un projet qui reviendrait en forme pour attaquer la deuxième canicule de
**2026** ?
https://git.tetalab.org/tTh/PovJouets Coté code, tout est bien en place dans le
[tetagit](https://git.tetalab.org/tTh/PovJouets) pour que vous
puissiez intégrer ces [jouets](./Jouets.md) dans vos univers
abscons. *Fork and enjoy.*
## TODO ## TODO
- bien revoir la hiérarchie des includes - bien revoir la hiérarchie des includes
- définir un jeu de textures cohérent - définir un jeu de textures cohérent
- trouver les maths pour faire tourner les roues
-

View File

@@ -12,18 +12,16 @@
#include "incs/benne.inc" #include "incs/benne.inc"
#include "incs/grue.inc" #include "incs/grue.inc"
// object { Boogie }
// object { Grande_Roue }
#include "incs/enseigne.inc" #include "incs/enseigne.inc"
object { Enseigne_Corail_texte } object { Enseigne_Corail_texte }
camera { camera {
location <17.5, 3, 10> location <14.5, 3, 7>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 0, 0> look_at <0, 0, 0>
angle ANGLE_CAM angle ANGLE_CAM
} }
object { Repere scale 0.5 } object { Repere scale 0.20 translate x*0.12 }
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

@@ -32,7 +32,7 @@ texture {
#declare Cabine_Loco_Electric = object #declare Cabine_Loco_Electric = object
{ {
union { merge {
box { <-4, 4, -11>, <4, 10, 11> } box { <-4, 4, -11>, <4, 10, 11> }
cylinder { <-3, 10, -11>, <-3, 10, 11> 1 } cylinder { <-3, 10, -11>, <-3, 10, 11> 1 }
cylinder { < 3, 10, -11>, < 3, 10, 11> 1 } cylinder { < 3, 10, -11>, < 3, 10, 11> 1 }

View File

@@ -26,7 +26,7 @@ texture { PinkAlabaster scale 3 }
/* ===========================================================*/ /* ===========================================================*/
#declare Enseigne_Corail_plaque = object #declare Enseigne_Corail_plaque = object
{ {
box { <-0.8, -0.01, -3.5>, <0.8, 0.01, 3.5> } box { <-0.5, -0.01, -4.25>, <0.6, 0.01, 4.25> }
pigment { color Blue } pigment { color Blue }
rotate z*90 rotate z*90
} }
@@ -39,7 +39,7 @@ text { ttf "data/tintin_talking.ttf" ,
} }
translate -3.6*x translate -3.6*x
rotate -90 * y rotate -90 * y
translate <0.03, -0.19, 0.00> translate <0.03, -0.19, -0.275>
} }
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
#declare Enseigne_Corail_texte = object #declare Enseigne_Corail_texte = object

View File

@@ -5,29 +5,38 @@
*/ */
#local H_quai = 110;
#local Decoupe_porte_gare = object
{
merge {
box { <-120, -1, -20>, <120, 240, 20> }
cylinder { <0, 0, -20>, <0, 0, 20>, 51
scale <1, 0.8, 1> translate y*230 }
}
}
#declare Corps_Gare = object #declare Corps_Gare = object
{ {
difference difference
{ {
box { <-600, 0, -200>, <600, 400, 200> } box { <-600, 0, -200>, <600, 400, 200> }
box { <-590, 0, -190>, <590, 390, 190> } box { <-590, 0, -190>, <590, 390, 190> }
#for (foo, -1, 3)
#declare foo = -3;
#while (foo <= 3)
#declare px = foo * 165; #declare px = foo * 165;
box { <px-42, 120, -222>, <px+42, 275, 222> } box { <px-42, 110, -222>, <px+42, 255, 222> }
#declare foo = foo + 1;
#end #end
object { Decoupe_porte_gare translate <-430, 0, -200> }
} }
texture {
pigment { color White } pigment { color White }
finish { phong 0.5 } finish { phong 0.5 }
translate y*100 }
} }
#declare Quai_Gare = object #declare Quai_Gare = object
{ {
box { <-700, 0, 220>, <700, 100, -420> } box { <-700, 0, 220>, <700, H_quai, -420> }
pigment { color White } pigment { color White }
finish { phong 0.4 } finish { phong 0.4 }
@@ -35,15 +44,13 @@ finish { phong 0.4 }
#include "incs/enseigne.inc" #include "incs/enseigne.inc"
#declare Gare = object #declare Gare = object
{ {
union union
{ {
object { Corps_Gare } object { Corps_Gare translate y*H_quai }
object { Quai_Gare } object { Quai_Gare }
object { Enseigne_Hello scale 15 translate <0, 460, -210> } object { Enseigne_Hello scale 15 translate <0, 465, -210> }
} }
} }

View File

@@ -2,7 +2,6 @@
instruments.inc instruments.inc
--------------- ---------------
*/ */
@@ -22,31 +21,26 @@
#declare Boitier_Cadran = object #declare Boitier_Cadran = object
{ {
union union {
{
cylinder { <0, 0, 1>, <0, 0, 0.2>, D_Cadran } cylinder { <0, 0, 1>, <0, 0, 0.2>, D_Cadran }
cylinder { <0, 0, .3>, <0, 0, .25>, D_Cadran+.05 } cylinder { <0, 0, .3>, <0, 0, .25>, D_Cadran+.05 }
difference difference {
{
cylinder { <0, 0, 1.2>, <0, 0, 0.9>, D_Cadran+0.05 } cylinder { <0, 0, 1.2>, <0, 0, 0.9>, D_Cadran+0.05 }
cylinder { <0, 0, 1.3>, <0, 0, 0.8>, D_Cadran-0.05 } cylinder { <0, 0, 1.3>, <0, 0, 0.8>, D_Cadran-0.05 }
} }
} }
texture { T_Chrome_2C } texture { T_Chrome_2C }
} }
/* voir le proggy 'make_cadran.f' */ /* voir le proggy 'make_cadran.f' */
#declare Fond_Cadran = object #declare Fond_Cadran = object
{ {
difference difference {
{
cylinder { <0, 0, 1.1>, <0, 0, 0.9>, D_Cadran } cylinder { <0, 0, 1.1>, <0, 0, 0.9>, D_Cadran }
cylinder { <0, 0, 1.2>, <0, 0, 0.8>, 0.06 } cylinder { <0, 0, 1.2>, <0, 0, 0.8>, 0.06 }
} }
pigment pigment {
{
image_map { png "picz/cadran.png" interpolate 2 } image_map { png "picz/cadran.png" interpolate 2 }
translate <-0.5, -0.5, 0> translate <-0.5, -0.5, 0>
scale <D_Cadran*2, D_Cadran*2, 1> scale <D_Cadran*2, D_Cadran*2, 1>
@@ -56,8 +50,7 @@ pigment
/* ----------------------------------------------------- instruments ------- */ /* ----------------------------------------------------- instruments ------- */
#declare Aiguille_0 = object #declare Aiguille_0 = object
{ {
union union {
{
// le pivot de l'aiguille // le pivot de l'aiguille
cylinder { <0, 0, 1.07>, <0, 0, 1.22>, 0.06 } cylinder { <0, 0, 1.07>, <0, 0, 1.22>, 0.06 }
@@ -72,8 +65,7 @@ texture { T_Copper_3C }
/* ----------------------------------------------------- instruments ------- */ /* ----------------------------------------------------- instruments ------- */
#declare Cadran_0 = object #declare Cadran_0 = object
{ {
union union {
{
object { Boitier_Cadran } object { Boitier_Cadran }
object { Fond_Cadran } object { Fond_Cadran }
object { Aiguille_0 } object { Aiguille_0 }
@@ -82,8 +74,7 @@ union
/* ----------------------------------------------------- instruments ------- */ /* ----------------------------------------------------- instruments ------- */
#declare Cadran_1 = object #declare Cadran_1 = object
{ {
union union {
{
object { Boitier_Cadran } object { Boitier_Cadran }
object { Fond_Cadran } object { Fond_Cadran }
object { Aiguille_0 } object { Aiguille_0 }
@@ -106,11 +97,8 @@ texture {
#declare Coque_Phare_0 = object #declare Coque_Phare_0 = object
{ {
union {
union difference {
{
difference
{
sphere { <0, 0, 0>, 1 } sphere { <0, 0, 0>, 1 }
sphere { <0, 0, 0>, .9 } sphere { <0, 0, 0>, .9 }
box { <-2, -2, 0>, <2, 2, 2> } box { <-2, -2, 0>, <2, 2, 2> }
@@ -123,8 +111,7 @@ texture { T_Chrome_2C }
#declare Vitre_Phare_0 = object #declare Vitre_Phare_0 = object
{ {
union union {
{
// cylinder { <0, 0, -.01>, <0, 0, .01>, 1 } // cylinder { <0, 0, -.01>, <0, 0, .01>, 1 }
torus { .8, .03 rotate x*90 } torus { .8, .03 rotate x*90 }
torus { .6, .03 rotate x*90 } torus { .6, .03 rotate x*90 }
@@ -137,14 +124,13 @@ texture { T_Glass1 }
#declare Phare_0 = object #declare Phare_0 = object
{ {
union union {
{
object { Coque_Phare_0 } object { Coque_Phare_0 }
object { Vitre_Phare_0 } object { Vitre_Phare_0 }
light_source light_source {
{
<0, 0, 0> color White <0, 0, 0> color White
fade_distance 6 fade_power 1
looks_like { Ampoule } looks_like { Ampoule }
translate z*-.5 translate z*-.5
} }

View File

@@ -20,37 +20,40 @@ texture { New_Penny scale 0.3 }
// ----------------------------------------------------------------- // -----------------------------------------------------------------
#declare Base_Poteau_1 = object #macro Base_Poteau_1 (Foo)
{
union union
{ {
box { <-1, 0, -1>, <-0.08, 1.6, 1.5> } box { <-1, 0, -1>, <-0.08, 1.6, 1.5> }
box { <0.08, 0, -1.5>, <1, 1.6, 1> } box { <0.08, 0, -1.5>, <1, 1.6, 1> }
} texture {
texture
{
pigment { color Gray75 } pigment { color Gray75 }
normal { bumps 0.333 } #local R = rand(RND);
#if (R < 0.50) normal { bumps 0.333 }
#else normal { dents 0.333 }
#end // if R
} }
} }
#end // macro
#declare Bois_Poteau_1 = object #macro Bois_Poteau_1 (Foo)
{
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, 21, 0>, 0.21 }
cylinder { <-4, 19, 0>, <4, 19, 0>, 0.20 } cylinder { <-4, 19, 0>, <4, 19, 0>, 0.20 }
#local R = rand(RND);
#if (R < 0.76) texture { T_Wood12 rotate x*90 scale 3 }
#else texture { T_Wood14 rotate x*90 scale 3 }
#end
} }
texture { T_Wood12 rotate x*90 scale 3 } #end // macro
}
#declare Poteau_1 = object #declare Poteau_1 = object
{ {
union union
{ {
object { Base_Poteau_1 } object { Base_Poteau_1 (0) }
object { Bois_Poteau_1 } object { Bois_Poteau_1 (0) }
} }
} }

View File

@@ -4,23 +4,26 @@ SPOOL="$HOME/TMP"
mkdir "$SPOOL" mkdir "$SPOOL"
NBRE=599 NBRE=599
POVOPT=" -w1280 -h960 +q9 -a -d " POVOPT=" Declare=Nbre=${NBRE} -w1152 -h900 +q9 +a -d "
SRCFILE="train.pov" SRCFILE="train.pov"
for idx in $(seq 0 $NBRE) for idx in $(seq 0 $NBRE)
do do
outfile=$(printf "%s/%04d.png" $SPOOL $idx) outfile=$(printf "%s/pj-%04d.png" $SPOOL $idx)
horloge=$(echo "$idx / $NBRE" | bc -l) horloge=$(echo "$idx / $NBRE" | bc -l)
printf "%-20s %.4f\n" $outfile $horloge printf "%-20s %.4f\n" $outfile $horloge
povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile} povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile}
sleep 10
done 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/pj-%04d.png \
-c:v libx264 -pix_fmt yuv420p \ -c:v libx264 -pix_fmt yuv420p \
$SPOOL/foo.mp4 -metadata artist='tTh des Bourtoulots' \
povjouets.mp4