Compare commits
No commits in common. "d5ad74cf77471f8855d6ba182c18898bc5555105" and "c0c031f21a0f95abb2ae696ff9499d85daeff200" have entirely different histories.
d5ad74cf77
...
c0c031f21a
@ -3,12 +3,10 @@
|
|||||||
C'est quoi ?
|
C'est quoi ?
|
||||||
|
|
||||||
Le BloubWorld (que l'on appelle aussi BloubSpace) est un espace borné
|
Le BloubWorld (que l'on appelle aussi BloubSpace) est un espace borné
|
||||||
dans lequel se déplacent des **bloubs**, lesquels sont
|
dans lequel se déplcent des **bloubs**, une sorte de particule
|
||||||
des sortes de particule
|
munie de certaines propriétés. Lesquelles évoluent en fonction du temps.
|
||||||
munie de certaines propriétés.
|
|
||||||
Lesquelles évoluent en fonction du temps.
|
|
||||||
|
|
||||||
## Description d'un bloub
|
## Description d'un bloubs
|
||||||
|
|
||||||
```
|
```
|
||||||
type t_bloubs
|
type t_bloubs
|
||||||
@ -29,8 +27,3 @@ Pas trop mal pour un premier jet. Il suffit de lire
|
|||||||
le script `runme.sh` pour avoir une idée de l'enchainement
|
le script `runme.sh` pour avoir une idée de l'enchainement
|
||||||
des opérations.
|
des opérations.
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- Concevoir un système de _bouding box_ facile à utiliser
|
|
||||||
- Réfléchir à une politique de vieillissement des bloubs
|
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ module bloubspace
|
|||||||
blb%py = rand() * 0.25
|
blb%py = rand() * 0.25
|
||||||
blb%pz = rand() - 0.50
|
blb%pz = rand() - 0.50
|
||||||
|
|
||||||
blb%vx = (rand() - 0.5) / 4.000
|
blb%vx = (rand() - 0.5) / 5.000
|
||||||
blb%vy = (rand() - 0.5) / 4.000
|
blb%vy = (rand() - 0.5) / 5.000
|
||||||
blb%vz = (rand() - 0.5) / 4.000
|
blb%vz = (rand() - 0.5) / 5.000
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
@ -40,8 +40,6 @@ module bloubspace
|
|||||||
type(t_bloubs), intent (inout) :: blb
|
type(t_bloubs), intent (inout) :: blb
|
||||||
real, intent (in) :: coef
|
real, intent (in) :: coef
|
||||||
|
|
||||||
! we must check that this bloub is alive ?
|
|
||||||
|
|
||||||
blb%px = blb%px + (blb%vx * coef)
|
blb%px = blb%px + (blb%vx * coef)
|
||||||
blb%py = blb%py + (blb%vy * coef)
|
blb%py = blb%py + (blb%vy * coef)
|
||||||
blb%pz = blb%pz + (blb%vz * coef)
|
blb%pz = blb%pz + (blb%vz * coef)
|
||||||
|
@ -31,7 +31,7 @@ program genbloubs
|
|||||||
bloub%nick = 'noname '
|
bloub%nick = 'noname '
|
||||||
bloub%alive = .TRUE.
|
bloub%alive = .TRUE.
|
||||||
call random_pv(bloub)
|
call random_pv(bloub)
|
||||||
bloub%radius = 0.025
|
bloub%radius = 0.009999
|
||||||
bloub%seq = 0
|
bloub%seq = 0
|
||||||
|
|
||||||
write(idu) bloub ! no error control ?
|
write(idu) bloub ! no error control ?
|
||||||
|
@ -44,7 +44,7 @@ program movebloubs
|
|||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call move_bloub (bloub, 1.10)
|
call move_bloub (bloub, 0.333)
|
||||||
|
|
||||||
bx = bx + bloub%px
|
bx = bx + bloub%px
|
||||||
by = by + bloub%py
|
by = by + bloub%py
|
||||||
@ -55,10 +55,6 @@ program movebloubs
|
|||||||
bloub%vy = -1.0 * bloub%vy
|
bloub%vy = -1.0 * bloub%vy
|
||||||
bloub%py = 0.0
|
bloub%py = 0.0
|
||||||
endif
|
endif
|
||||||
if (3.0 .lt. bloub%py) then
|
|
||||||
bloub%vy = -1.0 * bloub%vy
|
|
||||||
bloub%py = 3.0
|
|
||||||
endif
|
|
||||||
|
|
||||||
write(outu) bloub ! no error control ?
|
write(outu) bloub ! no error control ?
|
||||||
|
|
||||||
|
@ -7,9 +7,8 @@
|
|||||||
|
|
||||||
INCFILE="bloubs.inc"
|
INCFILE="bloubs.inc"
|
||||||
TMPPNG="/dev/shm/bloubs7.png"
|
TMPPNG="/dev/shm/bloubs7.png"
|
||||||
POVOPT="+Q9 +a -v -d -W640 -H480"
|
POVOPT="+Q9 -v -d -W640 -H480"
|
||||||
DDIR="frames"
|
DDIR="frames"
|
||||||
LOGERR="log.error"
|
|
||||||
|
|
||||||
make all
|
make all
|
||||||
err=$?
|
err=$?
|
||||||
@ -17,45 +16,43 @@ if [ $err -ne 0 ] ; then
|
|||||||
echo 'make error = ' $err
|
echo 'make error = ' $err
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# first, we have to make a seminal buch of bloubs
|
# first, we have to make a seminal buch of bloubs
|
||||||
# --> this function need to be paraletrizable
|
# --> this function need to be paraletrizable
|
||||||
#
|
#
|
||||||
./genbloubs in.blbs 10000
|
./genbloubs in.blbs 10000
|
||||||
|
|
||||||
for idx in $(seq 0 50)
|
for idx in $(seq 0 40)
|
||||||
do
|
do
|
||||||
|
|
||||||
echo "======== run passe $idx ========="
|
echo "======== run passe $idx ========="
|
||||||
|
|
||||||
./exportbloubs in.blbs | awk -f toinc.awk > $INCFILE
|
./exportbloubs in.blbs | awk -f toinc.awk > $INCFILE
|
||||||
|
|
||||||
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> $LOGERR
|
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> toto
|
||||||
grep "Trace Tim" $LOGERR
|
grep "Trace Tim" toto
|
||||||
|
|
||||||
txt=$(date +'%F %R:%S')
|
txt=$(date +'%F %R:%S')
|
||||||
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
||||||
echo $txt
|
echo $PNG $txt
|
||||||
|
|
||||||
convert ${TMPPNG} \
|
convert ${TMPPNG} \
|
||||||
-font fixed \
|
-font fixed \
|
||||||
-pointsize 16 \
|
-pointsize 12 \
|
||||||
-fill orange \
|
-fill orange \
|
||||||
-gravity south-east \
|
-gravity south-east \
|
||||||
-annotate +15+10 "$txt" \
|
-annotate +10+10 "$txt" \
|
||||||
$PNG
|
$PNG
|
||||||
|
|
||||||
echo $PNG '[done]'
|
|
||||||
|
|
||||||
./movebloubs in.blbs out.blbs
|
./movebloubs in.blbs out.blbs
|
||||||
mv out.blbs in.blbs
|
|
||||||
echo
|
|
||||||
|
|
||||||
|
cp out.blbs in.blbs
|
||||||
|
|
||||||
|
sleep 2 ; echo
|
||||||
done
|
done
|
||||||
|
|
||||||
rm $LOGERR
|
rm toto
|
||||||
|
|
||||||
convert -delay 10 -colors 192 $DDIR/*.png foo.gif
|
convert -delay 10 -colors 32 $DDIR/*.png foo.gif
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,35 +25,16 @@ plane {
|
|||||||
<0, 1, 0>, 0
|
<0, 1, 0>, 0
|
||||||
texture {
|
texture {
|
||||||
pigment { color Gray10 }
|
pigment { color Gray10 }
|
||||||
finish { phong 0.18 metallic 0.45 }
|
finish { phong 0.58 metallic 0.45 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
light_source { <4, 1, -9> color White }
|
||||||
|
|
||||||
#declare Les_Bornes = object
|
|
||||||
{
|
|
||||||
#declare BH = 5;
|
|
||||||
#declare BV = 3;
|
|
||||||
#declare BR = 0.02;
|
|
||||||
union {
|
|
||||||
cylinder { <-BH, 0, -BH>, <-BH, BV, -BH>, BR pigment { color Blue } }
|
|
||||||
cylinder { < BH, 0, -BH>, < BH, BV, -BH>, BR pigment { color Green } }
|
|
||||||
cylinder { <-BH, 0, BH>, <-BH, BV, BH>, BR pigment { color Green } }
|
|
||||||
cylinder { < BH, 0, BH>, < BH, BV, BH>, BR pigment { color Red } }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
object { Les_Bornes }
|
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
|
||||||
|
|
||||||
light_source { <4, 12, -11> color Gray80 }
|
|
||||||
light_source { <4, 9, 9> color White }
|
light_source { <4, 9, 9> color White }
|
||||||
|
|
||||||
camera {
|
camera {
|
||||||
location <7, 5, -16>
|
location <1, 3, -5>
|
||||||
look_at <0, 0, 0>
|
look_at <0, 0, 0>
|
||||||
right x*image_width/image_height
|
right x*image_width/image_height
|
||||||
angle 54
|
angle 48
|
||||||
}
|
}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# Random Stuff
|
|
||||||
|
|
||||||
Warning, non-sense inside !
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
# SoundBrotching
|
|
||||||
|
|
||||||
Stay tuned, film at 11.
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user