Compare commits
11 Commits
17e72ea61c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4149fa6cc1 | ||
|
|
1e11d7316e | ||
|
|
5f45012538 | ||
|
|
9414cefdeb | ||
|
|
35f30b7e39 | ||
|
|
42995bcad9 | ||
|
|
9d1ceee14b | ||
|
|
38bbd2fbea | ||
|
|
996e8f7372 | ||
|
|
cb0b4aedf1 | ||
|
|
b2a54ecaca |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,6 +2,8 @@
|
||||
*.png
|
||||
tmp/*.png
|
||||
*.gif
|
||||
*.swp
|
||||
*.mp4
|
||||
|
||||
*.pov-state
|
||||
tmp/*.pov-state
|
||||
|
||||
78
Jouets.md
Normal file
78
Jouets.md
Normal 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
|
||||
|
||||
2
Makefile
2
Makefile
@@ -27,7 +27,7 @@ GLOBDEPS=${INCS}/train.inc ${INCS}/poteaux.inc \
|
||||
${INCS}/instruments.inc ${INCS}/corail.inc \
|
||||
${INCS}/citerne.inc ${INCS}/benne.inc \
|
||||
${INCS}/constantes.inc ${INCS}/locomotive.inc \
|
||||
${INCS}/enseigne.inc \
|
||||
${INCS}/enseigne.inc ${INCS}/gare.inc \
|
||||
picz/plancher.png picz/cadran.png \
|
||||
contexte.inc monde.inc
|
||||
|
||||
|
||||
17
README.md
17
README.md
@@ -1,12 +1,21 @@
|
||||
# PovJouets
|
||||
|
||||
Un très très vieux projet POVray qui revient dans le triste
|
||||
monde de 2021.
|
||||
Et qui revient en forme pour attaquer **2025** ?
|
||||
C'est un très très vieux
|
||||
[projet](http://maison.tth.netlib.re/pov/jouets.html) en POVray qui
|
||||
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
|
||||
|
||||
- bien revoir la hiérarchie des includes
|
||||
- définir un jeu de textures cohérent
|
||||
- trouver les maths pour faire tourner les roues
|
||||
-
|
||||
|
||||
@@ -12,18 +12,16 @@
|
||||
#include "incs/benne.inc"
|
||||
#include "incs/grue.inc"
|
||||
|
||||
// object { Boogie }
|
||||
// object { Grande_Roue }
|
||||
#include "incs/enseigne.inc"
|
||||
object { Enseigne_Corail_texte }
|
||||
camera {
|
||||
location <17.5, 3, 10>
|
||||
location <14.5, 3, 7>
|
||||
right image_width/image_height*x
|
||||
look_at <0, 0, 0>
|
||||
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, 111, 250> color White }
|
||||
|
||||
@@ -32,7 +32,7 @@ texture {
|
||||
|
||||
#declare Cabine_Loco_Electric = object
|
||||
{
|
||||
union {
|
||||
merge {
|
||||
box { <-4, 4, -11>, <4, 10, 11> }
|
||||
cylinder { <-3, 10, -11>, <-3, 10, 11> 1 }
|
||||
cylinder { < 3, 10, -11>, < 3, 10, 11> 1 }
|
||||
|
||||
@@ -26,7 +26,7 @@ texture { PinkAlabaster scale 3 }
|
||||
/* ===========================================================*/
|
||||
#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 }
|
||||
rotate z*90
|
||||
}
|
||||
@@ -39,7 +39,7 @@ text { ttf "data/tintin_talking.ttf" ,
|
||||
}
|
||||
translate -3.6*x
|
||||
rotate -90 * y
|
||||
translate <0.03, -0.19, 0.00>
|
||||
translate <0.03, -0.19, -0.275>
|
||||
}
|
||||
/* ----------------------------------------------------------- */
|
||||
#declare Enseigne_Corail_texte = object
|
||||
|
||||
@@ -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
|
||||
{
|
||||
difference
|
||||
{
|
||||
box { <-600, 0, -200>, <600, 400, 200> }
|
||||
box { <-590, 0, -190>, <590, 390, 190> }
|
||||
|
||||
#declare foo = -3;
|
||||
#while (foo <= 3)
|
||||
#for (foo, -1, 3)
|
||||
#declare px = foo * 165;
|
||||
box { <px-42, 120, -222>, <px+42, 275, 222> }
|
||||
#declare foo = foo + 1;
|
||||
box { <px-42, 110, -222>, <px+42, 255, 222> }
|
||||
#end
|
||||
|
||||
object { Decoupe_porte_gare translate <-430, 0, -200> }
|
||||
}
|
||||
texture {
|
||||
pigment { color White }
|
||||
finish { phong 0.5 }
|
||||
translate y*100
|
||||
}
|
||||
}
|
||||
|
||||
#declare Quai_Gare = object
|
||||
{
|
||||
box { <-700, 0, 220>, <700, 100, -420> }
|
||||
box { <-700, 0, 220>, <700, H_quai, -420> }
|
||||
|
||||
pigment { color White }
|
||||
finish { phong 0.4 }
|
||||
@@ -35,15 +44,13 @@ finish { phong 0.4 }
|
||||
|
||||
#include "incs/enseigne.inc"
|
||||
|
||||
|
||||
|
||||
#declare Gare = object
|
||||
{
|
||||
union
|
||||
{
|
||||
object { Corps_Gare }
|
||||
object { Corps_Gare translate y*H_quai }
|
||||
object { Quai_Gare }
|
||||
object { Enseigne_Hello scale 15 translate <0, 460, -210> }
|
||||
object { Enseigne_Hello scale 15 translate <0, 465, -210> }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
instruments.inc
|
||||
---------------
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -22,31 +21,26 @@
|
||||
|
||||
#declare Boitier_Cadran = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
cylinder { <0, 0, 1>, <0, 0, 0.2>, D_Cadran }
|
||||
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.3>, <0, 0, 0.8>, D_Cadran-0.05 }
|
||||
}
|
||||
}
|
||||
|
||||
texture { T_Chrome_2C }
|
||||
}
|
||||
|
||||
/* voir le proggy 'make_cadran.f' */
|
||||
#declare Fond_Cadran = object
|
||||
{
|
||||
difference
|
||||
{
|
||||
difference {
|
||||
cylinder { <0, 0, 1.1>, <0, 0, 0.9>, D_Cadran }
|
||||
cylinder { <0, 0, 1.2>, <0, 0, 0.8>, 0.06 }
|
||||
}
|
||||
|
||||
pigment
|
||||
{
|
||||
pigment {
|
||||
image_map { png "picz/cadran.png" interpolate 2 }
|
||||
translate <-0.5, -0.5, 0>
|
||||
scale <D_Cadran*2, D_Cadran*2, 1>
|
||||
@@ -56,8 +50,7 @@ pigment
|
||||
/* ----------------------------------------------------- instruments ------- */
|
||||
#declare Aiguille_0 = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
// le pivot de l'aiguille
|
||||
cylinder { <0, 0, 1.07>, <0, 0, 1.22>, 0.06 }
|
||||
|
||||
@@ -72,8 +65,7 @@ texture { T_Copper_3C }
|
||||
/* ----------------------------------------------------- instruments ------- */
|
||||
#declare Cadran_0 = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
object { Boitier_Cadran }
|
||||
object { Fond_Cadran }
|
||||
object { Aiguille_0 }
|
||||
@@ -82,8 +74,7 @@ union
|
||||
/* ----------------------------------------------------- instruments ------- */
|
||||
#declare Cadran_1 = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
object { Boitier_Cadran }
|
||||
object { Fond_Cadran }
|
||||
object { Aiguille_0 }
|
||||
@@ -106,11 +97,8 @@ texture {
|
||||
|
||||
#declare Coque_Phare_0 = object
|
||||
{
|
||||
|
||||
union
|
||||
{
|
||||
difference
|
||||
{
|
||||
union {
|
||||
difference {
|
||||
sphere { <0, 0, 0>, 1 }
|
||||
sphere { <0, 0, 0>, .9 }
|
||||
box { <-2, -2, 0>, <2, 2, 2> }
|
||||
@@ -123,8 +111,7 @@ texture { T_Chrome_2C }
|
||||
|
||||
#declare Vitre_Phare_0 = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
// cylinder { <0, 0, -.01>, <0, 0, .01>, 1 }
|
||||
torus { .8, .03 rotate x*90 }
|
||||
torus { .6, .03 rotate x*90 }
|
||||
@@ -137,14 +124,13 @@ texture { T_Glass1 }
|
||||
|
||||
#declare Phare_0 = object
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
object { Coque_Phare_0 }
|
||||
object { Vitre_Phare_0 }
|
||||
|
||||
light_source
|
||||
{
|
||||
light_source {
|
||||
<0, 0, 0> color White
|
||||
fade_distance 6 fade_power 1
|
||||
looks_like { Ampoule }
|
||||
translate z*-.5
|
||||
}
|
||||
|
||||
@@ -20,37 +20,40 @@ texture { New_Penny scale 0.3 }
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
#declare Base_Poteau_1 = object
|
||||
{
|
||||
#macro Base_Poteau_1 (Foo)
|
||||
union
|
||||
{
|
||||
box { <-1, 0, -1>, <-0.08, 1.6, 1.5> }
|
||||
box { <0.08, 0, -1.5>, <1, 1.6, 1> }
|
||||
}
|
||||
texture
|
||||
{
|
||||
texture {
|
||||
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
|
||||
{
|
||||
cylinder { <0, 0, 0>, <0, 20, 0>, 0.42 }
|
||||
cone { <0, 20, 0>, 0.64, <0, 21, 0>, 0.21 }
|
||||
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
|
||||
{
|
||||
union
|
||||
{
|
||||
object { Base_Poteau_1 }
|
||||
object { Bois_Poteau_1 }
|
||||
object { Base_Poteau_1 (0) }
|
||||
object { Bois_Poteau_1 (0) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,23 +4,26 @@ SPOOL="$HOME/TMP"
|
||||
mkdir "$SPOOL"
|
||||
|
||||
NBRE=599
|
||||
POVOPT=" -w1280 -h960 +q9 -a -d "
|
||||
POVOPT=" Declare=Nbre=${NBRE} -w1152 -h900 +q9 +a -d "
|
||||
SRCFILE="train.pov"
|
||||
|
||||
for idx in $(seq 0 $NBRE)
|
||||
do
|
||||
|
||||
outfile=$(printf "%s/%04d.png" $SPOOL $idx)
|
||||
outfile=$(printf "%s/pj-%04d.png" $SPOOL $idx)
|
||||
horloge=$(echo "$idx / $NBRE" | bc -l)
|
||||
|
||||
printf "%-20s %.4f\n" $outfile $horloge
|
||||
|
||||
povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile}
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
ffmpeg -nostdin \
|
||||
-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 \
|
||||
$SPOOL/foo.mp4
|
||||
-metadata artist='tTh des Bourtoulots' \
|
||||
povjouets.mp4
|
||||
|
||||
Reference in New Issue
Block a user