Compare commits
No commits in common. "5030fda56f3c1d83a492db5a7cc0cb28a2f43174" and "5b525f5949f0282fce8995fac69d6c485db763c5" have entirely different histories.
5030fda56f
...
5b525f5949
2
BloubWorld/.gitignore
vendored
2
BloubWorld/.gitignore
vendored
@ -7,7 +7,6 @@ nbimg.inc
|
|||||||
*.mp4
|
*.mp4
|
||||||
*.lst
|
*.lst
|
||||||
*.wav
|
*.wav
|
||||||
*.xyz
|
|
||||||
frames/*
|
frames/*
|
||||||
log.*
|
log.*
|
||||||
|
|
||||||
@ -18,5 +17,4 @@ mergebloubs
|
|||||||
listbloubs
|
listbloubs
|
||||||
essai
|
essai
|
||||||
|
|
||||||
WS/*.data
|
|
||||||
core
|
core
|
||||||
|
@ -62,10 +62,7 @@ ce qu'il faut pour les différents moteurs de rendu.
|
|||||||
Bon, pour le moment, dans les formats il n'y a que POVray,
|
Bon, pour le moment, dans les formats il n'y a que POVray,
|
||||||
mais Gnuplot et/ou Rdata arriveront bien un de ces jours.[source](exportbloubs.f90)
|
mais Gnuplot et/ou Rdata arriveront bien un de ces jours.[source](exportbloubs.f90)
|
||||||
|
|
||||||
Un exemple : l'idée est de générer un fichier `.inc` pour
|
|
||||||
Povray pour utiliser les données exportées dans une scène,
|
|
||||||
par exemple le barycentre des bloubs. Et c'est très facile
|
|
||||||
à faire avec un [script Awk](toinc.awk).
|
|
||||||
|
|
||||||
### mergebloubs
|
### mergebloubs
|
||||||
|
|
||||||
|
@ -68,37 +68,31 @@ module bloubspace
|
|||||||
end subroutine load_boundingbox
|
end subroutine load_boundingbox
|
||||||
|
|
||||||
! ----------------------------------------------------------------
|
! ----------------------------------------------------------------
|
||||||
!-
|
|
||||||
! coefxyz :
|
subroutine make_a_random_bloub(blb)
|
||||||
! dispersion de la position autour de l'origine
|
|
||||||
!-
|
|
||||||
subroutine make_a_random_bloub(blb, coefxyz)
|
|
||||||
type(t_bloubs), intent (out) :: blb
|
type(t_bloubs), intent (out) :: blb
|
||||||
real, intent(in) :: coefxyz
|
|
||||||
|
|
||||||
! write(0, *) "coef xyz = ", coefxyz
|
blb%px = 3.57 * (rand() - 0.50)
|
||||||
blb%px = coefxyz * (rand() - 0.50)
|
blb%py = 2.66 * (rand() - 0.50)
|
||||||
blb%py = coefxyz * (rand() - 0.50)
|
blb%pz = 3.57 * (rand() - 0.50)
|
||||||
blb%pz = coefxyz * (rand() - 0.50)
|
|
||||||
|
|
||||||
blb%vx = (rand()) / 5.000
|
blb%vx = (rand()) / 2.500
|
||||||
if (blb%px .LT. 0.0) blb%vx = -blb%vx
|
if (blb%px .LT. 0.0) blb%vx = -blb%vx
|
||||||
|
|
||||||
blb%vy = 0.2 + (rand()) / 8.000
|
blb%vy = (rand()) / 4.000
|
||||||
if (blb%py .LT. 0.0) blb%vy = -blb%vy
|
if (blb%py .LT. 0.0) blb%vy = -blb%vx
|
||||||
|
|
||||||
blb%vz = (rand()) / 5.000
|
blb%vz = (rand()) / 2.500
|
||||||
if (blb%pz .LT. 0.0) blb%vz = -blb%vz
|
if (blb%pz .LT. 0.0) blb%vz = -blb%vz
|
||||||
|
|
||||||
blb%state = 0
|
blb%state = 0
|
||||||
blb%alive = .TRUE.
|
blb%alive = .TRUE.
|
||||||
blb%age = 0
|
blb%age = 0
|
||||||
blb%agemax = 100
|
blb%agemax = 300
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
! ----------------------------------------------------------------
|
! ----------------------------------------------------------------
|
||||||
! Load a blbs file into an array of bloubs
|
! Load a blbs file into an array of bloubs
|
||||||
|
|
||||||
subroutine spit_bloubs_to_file (fname, blbarray, towrite)
|
subroutine spit_bloubs_to_file (fname, blbarray, towrite)
|
||||||
character(*), intent(in) :: fname
|
character(*), intent(in) :: fname
|
||||||
type(t_bloubs), dimension(:) :: blbarray
|
type(t_bloubs), dimension(:) :: blbarray
|
||||||
@ -131,7 +125,7 @@ module bloubspace
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
close(output)
|
close(output)
|
||||||
write(0, '(1X, "spitted ", I0, " bloubs.")') spitted
|
write(0, '(1X, "spitted ", I6, " bloubs")') spitted
|
||||||
|
|
||||||
end subroutine spit_bloubs_to_file
|
end subroutine spit_bloubs_to_file
|
||||||
! ----------------------------------------------------------------
|
! ----------------------------------------------------------------
|
||||||
@ -207,9 +201,7 @@ module bloubspace
|
|||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
! ----------------------------------------------------------------
|
! ----------------------------------------------------------------
|
||||||
!-
|
|
||||||
! Deplacement d'un bloub
|
|
||||||
!-
|
|
||||||
subroutine move_bloub (blb, coef)
|
subroutine move_bloub (blb, coef)
|
||||||
type(t_bloubs), intent (inout) :: blb
|
type(t_bloubs), intent (inout) :: blb
|
||||||
real, intent (in) :: coef
|
real, intent (in) :: coef
|
||||||
@ -223,9 +215,7 @@ module bloubspace
|
|||||||
! ----------------------------------------------------------------
|
! ----------------------------------------------------------------
|
||||||
!
|
!
|
||||||
! detection des collisions avec les parois de la boite
|
! detection des collisions avec les parois de la boite
|
||||||
! laquelle boite gagnerais beaucoup a etre parametrable,
|
! laquelle boite gagnerais beaucoup a etre parametrable.
|
||||||
! ainsi qu'un éventuel coefficient de réduction de la
|
|
||||||
! vitesse. XXX
|
|
||||||
!
|
!
|
||||||
subroutine bound_a_bloub (blb)
|
subroutine bound_a_bloub (blb)
|
||||||
type(t_bloubs), intent (inout) :: blb
|
type(t_bloubs), intent (inout) :: blb
|
||||||
@ -292,13 +282,13 @@ module bloubspace
|
|||||||
subroutine green_soylent (blb)
|
subroutine green_soylent (blb)
|
||||||
type(t_bloubs), intent (inout) :: blb
|
type(t_bloubs), intent (inout) :: blb
|
||||||
|
|
||||||
if (blb%age .gt. 240) then
|
if (blb%age .gt. 24) then
|
||||||
blb%alive = .FALSE.
|
blb%alive = .FALSE.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! this is juste a molly-guard, don't worry
|
! this is juste a molly-guard, don't worry
|
||||||
!
|
!
|
||||||
if (blb%radius .GT. 4.0) then
|
if (blb%radius .GT. 2.0) then
|
||||||
blb%alive = .FALSE.
|
blb%alive = .FALSE.
|
||||||
endif
|
endif
|
||||||
end subroutine
|
end subroutine
|
||||||
|
@ -49,7 +49,7 @@ sur les trois directions de l'espace bloubeux.
|
|||||||
D'autres, comme `alive`, sont plus délicates à expliquer,
|
D'autres, comme `alive`, sont plus délicates à expliquer,
|
||||||
sauf si l'on considère que les bloubs sont zombifiables.
|
sauf si l'on considère que les bloubs sont zombifiables.
|
||||||
|
|
||||||
D'autres, comme age et agemax, sont bien plus sujettes à de diverses
|
D'autres, comme l'age et l'agemax, sont bien plus sujettes à de diverses
|
||||||
interprétations. doit-on incrémenter l'age à chaque tick d'horloge
|
interprétations. doit-on incrémenter l'age à chaque tick d'horloge
|
||||||
ou à chaque évènement discret ? Et à quel age un bloub devient-il
|
ou à chaque évènement discret ? Et à quel age un bloub devient-il
|
||||||
trop vieux, à quel age va-t-il mourir ?
|
trop vieux, à quel age va-t-il mourir ?
|
||||||
@ -78,23 +78,7 @@ taille, densité, age et couleur qu'il y a des choses à faire.
|
|||||||
* Agemax : (maximum des deux agemaxs) - forfait
|
* Agemax : (maximum des deux agemaxs) - forfait
|
||||||
* Couleurs : un système de mutation selon critères ?
|
* Couleurs : un système de mutation selon critères ?
|
||||||
|
|
||||||
Il ne reste qu'à coder tout ça...
|
Il ne reste qu'à coder tout ça.
|
||||||
|
|
||||||
## Analyse de population
|
|
||||||
|
|
||||||
Nous avons des moyens assez simple d'enregistrer l'état complet
|
|
||||||
de la population de bloubs à chaque itération.
|
|
||||||
La meilleure preuve étant les vidéos publiés dans les peertubes.
|
|
||||||
Mais nous devrions plus nous pencher sur les aspects statistiques,
|
|
||||||
comme la démographie, l'état de santé, la pyramide des ages...
|
|
||||||
|
|
||||||
Les traitements simples peuvent faire appel à Awk et Gnuplot.
|
|
||||||
Pour les visions plus avancées, un logiciel spécialisé sera
|
|
||||||
le bienvenu, et **R** est un bon candidat potentiel.
|
|
||||||
On peut aussi envisager la pureté du code Fortran,
|
|
||||||
couplé avec un *toolkit* graphique comme XXX.
|
|
||||||
|
|
||||||
Il ne reste qu'à coder tout ça...
|
|
||||||
|
|
||||||
## Et pour la suite ?
|
## Et pour la suite ?
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ program genbloubs
|
|||||||
|
|
||||||
bloub%nick = 'noname '
|
bloub%nick = 'noname '
|
||||||
bloub%num = i + 41
|
bloub%num = i + 41
|
||||||
call make_a_random_bloub(bloub, 8.25)
|
call make_a_random_bloub(bloub)
|
||||||
bloub%radius = 0.015 + (0.08*rand())
|
bloub%radius = 0.035 + (0.03*rand())
|
||||||
|
|
||||||
write(idu) bloub ! no error control ?
|
write(idu) bloub ! no error control ?
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ program mergebloubs
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call slurp_bloubs_file_in_array(trim(infile), bloubs, nbgot)
|
call slurp_bloubs_file_in_array(trim(infile), bloubs, nbgot)
|
||||||
write(0, '(A,I0,1X,A)') " slurped ", nbgot, "bloubs"
|
write(0, '(A,I6,1X,A)') " slurped ", nbgot, "bloubs"
|
||||||
|
|
||||||
contacts = 0
|
contacts = 0
|
||||||
do ia = 1, nbgot
|
do ia = 1, nbgot
|
||||||
@ -42,26 +42,19 @@ program mergebloubs
|
|||||||
dist = distance_of_bloubs(bloubs(ia), bloubs(ib))
|
dist = distance_of_bloubs(bloubs(ia), bloubs(ib))
|
||||||
radd = bloubs(ia)%radius + bloubs(ib)%radius
|
radd = bloubs(ia)%radius + bloubs(ib)%radius
|
||||||
if (dist .LT. radd) then
|
if (dist .LT. radd) then
|
||||||
|
|
||||||
contacts = contacts + 1
|
contacts = contacts + 1
|
||||||
call merge_two_bloubs(bloubs(ia), bloubs(ib), merged)
|
call merge_two_bloubs(bloubs(ia), bloubs(ib), merged)
|
||||||
bloubs(ia) = merged
|
bloubs(ia) = merged
|
||||||
bloubs(ia)%nick = "marged"
|
bloubs(ia)%nick = "marged"
|
||||||
bloubs(ia)%state = 1;
|
bloubs(ia)%state = 1;
|
||||||
bloubs(ib)%alive = .FALSE.
|
bloubs(ib)%alive = .FALSE.
|
||||||
write(0, *) " *** merged ", ia, " and ", ib, &
|
|
||||||
" new r = ", merged%radius
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call spit_bloubs_to_file (outfile, bloubs, nbgot)
|
call spit_bloubs_to_file (outfile, bloubs, nbgot)
|
||||||
if (contacts .GT. 0) then
|
! print *, contacts, "contacts pour ", nbgot, "bloubs"
|
||||||
write(0, '(A,I0,A,I0,A)') &
|
|
||||||
" merge: ", contacts, " contacts pour ", nbgot, " bloubs"
|
|
||||||
endif
|
|
||||||
|
|
||||||
! STOP 'mergebloubs [done]'
|
! STOP 'mergebloubs [done]'
|
||||||
|
|
||||||
@ -84,8 +77,8 @@ contains
|
|||||||
blr%vy = (bla%vy + blb%vy) / 2.0
|
blr%vy = (bla%vy + blb%vy) / 2.0
|
||||||
blr%vz = (bla%vz + blb%vz) / 2.0
|
blr%vz = (bla%vz + blb%vz) / 2.0
|
||||||
|
|
||||||
blr%radius = (bla%radius + blb%radius)
|
blr%radius = (bla%radius + blb%radius) / 2.222
|
||||||
blr%age = max(bla%age, blb%age)
|
blr%age = min(bla%age, blb%age)
|
||||||
|
|
||||||
! bring it to life !
|
! bring it to life !
|
||||||
blr%alive = .TRUE.
|
blr%alive = .TRUE.
|
||||||
|
@ -48,9 +48,6 @@ program movebloubs
|
|||||||
compteur = 0
|
compteur = 0
|
||||||
killed = 0
|
killed = 0
|
||||||
|
|
||||||
!-
|
|
||||||
! begin of bigloop
|
|
||||||
!-
|
|
||||||
do
|
do
|
||||||
read (unit=inu, iostat=errcode) bloub
|
read (unit=inu, iostat=errcode) bloub
|
||||||
if (0 .ne. errcode) then
|
if (0 .ne. errcode) then
|
||||||
@ -62,14 +59,14 @@ program movebloubs
|
|||||||
call move_bloub (bloub, 0.185)
|
call move_bloub (bloub, 0.185)
|
||||||
call bound_a_bloub (bloub)
|
call bound_a_bloub (bloub)
|
||||||
if (bloub%radius .GT. 0.0238) then
|
if (bloub%radius .GT. 0.0238) then
|
||||||
bloub%radius = bloub%radius * 0.999
|
bloub%radius = bloub%radius * 0.996
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! XXX call green_soylent (bloub)
|
call green_soylent (bloub)
|
||||||
! XXX if (.NOT. bloub%alive) then
|
if (.NOT. bloub%alive) then
|
||||||
! XXX ! write(0, '(A)') " KILL!"
|
! write(0, '(A)') " KILL!"
|
||||||
! XXX killed = killed + 1
|
killed = killed + 1
|
||||||
! XXX endif
|
endif
|
||||||
|
|
||||||
! calcul du barycentre
|
! calcul du barycentre
|
||||||
bx = bx + dble(bloub%px)
|
bx = bx + dble(bloub%px)
|
||||||
@ -87,18 +84,33 @@ program movebloubs
|
|||||||
enddo ! end of main loop
|
enddo ! end of main loop
|
||||||
|
|
||||||
write(0, '(1X,I0,1X,A)') compteur, "bloubs processed"
|
write(0, '(1X,I0,1X,A)') compteur, "bloubs processed"
|
||||||
|
|
||||||
|
! ok, we have read all the bloubs in the input file
|
||||||
|
|
||||||
|
! insert some fancy conditional here
|
||||||
|
if (compteur .LT. 200) then
|
||||||
|
call add_more_bloubs(outu, 4, 0.026)
|
||||||
|
endif
|
||||||
|
|
||||||
|
! insert some very fancy conditional here
|
||||||
|
if (compteur .LT. 800) then
|
||||||
|
rnd = rand()
|
||||||
|
! write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
|
||||||
|
if (rnd .LT. 0.0604) then
|
||||||
|
call add_more_bloubs(outu, 11, 0.019)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
close(inu) ; close(outu)
|
||||||
|
|
||||||
if (killed .GT. 0) then
|
if (killed .GT. 0) then
|
||||||
write (0, '(1X,I0,A)') killed, " bloubs killed"
|
write (0, '(1X,I0,A)') killed, " bloubs killed"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! ok, we have read all the bloubs from the input file
|
bx = bx / dble(compteur)
|
||||||
|
by = by / dble(compteur)
|
||||||
! insert some fancy conditional here
|
bz = bz / dble(compteur)
|
||||||
if (compteur .LT. 200) then
|
write (0, '(A,3(F12.6,3X))') "barycentre : ", bx, by, bz
|
||||||
call add_more_bloubs(outu, 5, 0.032)
|
|
||||||
endif
|
|
||||||
|
|
||||||
close(inu) ; close(outu)
|
|
||||||
|
|
||||||
! --------------------------------------------------------------
|
! --------------------------------------------------------------
|
||||||
contains
|
contains
|
||||||
@ -109,14 +121,14 @@ contains
|
|||||||
type(t_bloubs) :: bloub
|
type(t_bloubs) :: bloub
|
||||||
integer :: foo, count
|
integer :: foo, count
|
||||||
|
|
||||||
count = nbre+mod(irand(), 3)
|
count = nbre+mod(irand(), 6)
|
||||||
write(0, '(A,I4,1X,A)') "movebloubs adding", count, "bloubs"
|
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
|
||||||
|
|
||||||
do foo=1, count
|
do foo=1, count
|
||||||
|
|
||||||
bloub%nick = 'newbie '
|
bloub%nick = 'newbie '
|
||||||
call make_a_random_bloub(bloub, 7.12)
|
call make_a_random_bloub(bloub)
|
||||||
bloub%radius = rayon + (0.09*rand())
|
bloub%radius = rayon + (0.05*rand())
|
||||||
bloub%age = 1
|
bloub%age = 1
|
||||||
bloub%alive = .TRUE.
|
bloub%alive = .TRUE.
|
||||||
bloub%num = mod(irand(), 42)
|
bloub%num = mod(irand(), 42)
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BARYDATAS="WS/log.barycentres"
|
|
||||||
|
|
||||||
wc -l $BARYDATAS
|
|
@ -7,19 +7,16 @@
|
|||||||
|
|
||||||
INCFILE="WS/bloubs.inc"
|
INCFILE="WS/bloubs.inc"
|
||||||
TMPPNG="/dev/shm/bloubs7.png"
|
TMPPNG="/dev/shm/bloubs7.png"
|
||||||
POVOPT="+Q9 +a -v -d -W800 -H600 -WT2"
|
POVOPT="+Q9 -a -v -d -W1600 -H1200 -WT2"
|
||||||
DDIR="frames/a"
|
DDIR="frames/a"
|
||||||
LOGERR="log.error"
|
LOGERR="log.error"
|
||||||
TXTCOLOR="#db2080"
|
TXTCOLOR="#db7000"
|
||||||
|
|
||||||
BLOUBDATAS="WS/bloubs.data"
|
|
||||||
BARYDATAS="WS/log.barycentres"
|
|
||||||
|
|
||||||
# --- put the work file in ramdisk
|
# --- put the work file in ramdisk
|
||||||
BLBS_IN="/dev/shm/in.blbs"
|
BLBS_IN="/dev/shm/in.blbs"
|
||||||
BLBS_OUT="/dev/shm/out.blbs"
|
BLBS_OUT="/dev/shm/out.blbs"
|
||||||
|
|
||||||
NBIMG=2000
|
NBIMG=120
|
||||||
|
|
||||||
make all
|
make all
|
||||||
err=$?
|
err=$?
|
||||||
@ -34,20 +31,14 @@ printf "\n#declare NbImg = %d;\n" $NBIMG > WS/nbimg.inc
|
|||||||
# 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 parametrizable
|
# --> this function need to be parametrizable
|
||||||
#
|
#
|
||||||
./genbloubs ${BLBS_IN} 97
|
./genbloubs ${BLBS_IN} 50
|
||||||
|
|
||||||
for idx in $(seq 0 $((NBIMG-1)) )
|
for idx in $(seq 0 $((NBIMG-1)) )
|
||||||
do
|
do
|
||||||
|
|
||||||
echo "============== run passe $idx ===================="
|
echo "======== run passe $idx ========="
|
||||||
|
|
||||||
# make the bloubs's data readable by POVray
|
./exportbloubs ${BLBS_IN} | awk -f toinc.awk > $INCFILE
|
||||||
#
|
|
||||||
./exportbloubs ${BLBS_IN} > $BLOUBDATAS
|
|
||||||
awk -f toinc.awk < $BLOUBDATAS > $INCFILE
|
|
||||||
awk '{ print $1, $2, $3 }' < $BLOUBDATAS > $BARYDATAS
|
|
||||||
|
|
||||||
echo "### raytracing pass $idx"
|
|
||||||
|
|
||||||
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> $LOGERR
|
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> $LOGERR
|
||||||
if [ 0 -ne $? ] ; then
|
if [ 0 -ne $? ] ; then
|
||||||
@ -56,20 +47,20 @@ do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
td=$(date -u +'%F %R:%S' | tr '01' 'ol')
|
td=$(date -u +'%F %R:%S' | tr '01' 'ol')
|
||||||
hi=$(printf "#%04d" $idx | tr '01' 'ol')
|
hi=$(printf "#%05d" $idx | tr '01' 'ol')
|
||||||
count=$(tail -1 "WS/log.nb_bloubs")
|
count=$(tail -1 "WS/log.nb_bloubs")
|
||||||
|
|
||||||
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
||||||
|
|
||||||
convert ${TMPPNG} \
|
convert ${TMPPNG} \
|
||||||
-font Courier-Bold \
|
-font Courier-Bold \
|
||||||
-pointsize 22 \
|
-pointsize 28 \
|
||||||
-fill "$TXTCOLOR" \
|
-fill "$TXTCOLOR" \
|
||||||
-gravity south-east \
|
-gravity south-east \
|
||||||
-annotate +25+5 "$td" \
|
-annotate +25+5 "$td" \
|
||||||
-gravity south-west \
|
-gravity south-west \
|
||||||
-annotate +25+5 "$hi" \
|
-annotate +25+5 "$hi" \
|
||||||
-pointsize 28 \
|
-pointsize 48 \
|
||||||
-gravity north-east \
|
-gravity north-east \
|
||||||
-annotate +45+5 "$count" \
|
-annotate +45+5 "$count" \
|
||||||
-gravity north-west \
|
-gravity north-west \
|
||||||
@ -82,8 +73,8 @@ do
|
|||||||
./mergebloubs ${BLBS_OUT} ${BLBS_IN}
|
./mergebloubs ${BLBS_OUT} ${BLBS_IN}
|
||||||
# mv ${BLBS_OUT} ${BLBS_IN}
|
# mv ${BLBS_OUT} ${BLBS_IN}
|
||||||
|
|
||||||
echo "### run done"
|
echo
|
||||||
sleep 10
|
sleep 90
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -44,43 +44,22 @@ union {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cylinder { 0, -y, 30 pigment { color White } translate -4.20*y}
|
plane { y, 0 pigment { color White } translate -4.20*y}
|
||||||
|
|
||||||
sky_sphere {
|
|
||||||
pigment { color Gray20 }
|
|
||||||
emission rgb <0.1, 0.1, 0.1>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// object { cylinder { <0, 0, 0>, <10, 0, 0>, 0.05 pigment { color Cyan } } }
|
// object { cylinder { <0, 0, 0>, <10, 0, 0>, 0.05 pigment { color Cyan } } }
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
||||||
#declare Croisillon = object
|
|
||||||
{
|
|
||||||
union {
|
|
||||||
cylinder { -1*x, 1*x, 0.04 }
|
|
||||||
cylinder { -1*y, 1*y, 0.04 }
|
|
||||||
cylinder { -1*z, 1*z, 0.04 }
|
|
||||||
}
|
|
||||||
texture {
|
|
||||||
pigment { color Gray50 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
object { Croisillon scale 0.80 translate <Bary_X, Bary_Y, Bary_Z> }
|
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
|
||||||
|
|
||||||
#declare BH = 6; // H = taille en horizontal
|
#declare BH = 6; // H = taille en horizontal
|
||||||
#declare BV = 4; // V = taille en vertical
|
#declare BV = 4; // V = taille en vertical
|
||||||
#declare BR = 0.056;
|
#declare BR = 0.034;
|
||||||
|
|
||||||
#declare Une_Borne = object
|
#declare Une_Borne = object
|
||||||
{
|
{
|
||||||
merge {
|
merge {
|
||||||
cylinder { <0, BV, 0>, <0, -BV, 0>, BR }
|
cylinder { <0, BV, 0>, <0, -BV, 0>, BR }
|
||||||
cylinder { <0, 0.036, 0>, <0, -0.036, 0>, BR*2 }
|
cylinder { <0, 0.018, 0>, <0, -0.018, 0>, BR*3 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,19 +113,21 @@ union {
|
|||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
||||||
light_source { <19, 12+NormClock, -17> color Gray80 }
|
light_source { <19, 12+NormClock, -17> color Gray80 }
|
||||||
light_source { <12, 10-NormClock, -29> color Gray70 }
|
light_source { <11, 10-NormClock, -29> color Gray60 }
|
||||||
|
|
||||||
#declare XCAM = 5 - ( 10 * NormClock);
|
#declare XCAM = 8 - ( 15 * NormClock);
|
||||||
#declare YCAM = -1.1 + (1.15 * NormClock);
|
#declare YCAM = -1.1 + (0.95 * NormClock);
|
||||||
#declare ZCAM = -16.50;
|
#declare ZCAM = -13.10;
|
||||||
|
|
||||||
#declare XLAT = 0;
|
#declare XLAT = Bary_X;
|
||||||
#declare YLAT = 0;
|
#declare YLAT = Bary_Y;
|
||||||
#declare ZLAT = 0;
|
#declare ZLAT = Bary_Z;
|
||||||
|
|
||||||
|
// object { Repere scale 2.5 translate <XLAT, YLAT, ZLAT> }
|
||||||
|
|
||||||
camera {
|
camera {
|
||||||
location <XCAM, YCAM, ZCAM>
|
location <XCAM, YCAM, ZCAM>
|
||||||
look_at <XLAT, YLAT, ZLAT>
|
look_at <XLAT, YLAT, ZLAT>
|
||||||
right x*image_width/image_height
|
right x*image_width/image_height
|
||||||
angle 64
|
angle 86
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ BEGIN {
|
|||||||
count = 0
|
count = 0
|
||||||
bx = by = bz = 0.0
|
bx = by = bz = 0.0
|
||||||
print "// GENERATED FILE, DON'T TOUCH IT !"
|
print "// GENERATED FILE, DON'T TOUCH IT !"
|
||||||
print "// --------------------------------"
|
|
||||||
print
|
|
||||||
print "#declare Bloubs = object\n{"
|
print "#declare Bloubs = object\n{"
|
||||||
print "union\t{"
|
print "union\t{"
|
||||||
}
|
}
|
||||||
@ -20,14 +18,13 @@ BEGIN {
|
|||||||
merged = $6
|
merged = $6
|
||||||
|
|
||||||
color = "Cyan"
|
color = "Cyan"
|
||||||
if (age < 18) color = "Gray40"
|
if (age < 2) color = "Yellow"
|
||||||
if (age < 2) color = "Gray10"
|
|
||||||
if (merged) {
|
if (merged) {
|
||||||
if (age > 120) color = "Orange"
|
if (age > 12) color = "Orange"
|
||||||
else color = "Yellow"
|
else color = "Red"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (age > 120) color = "Black"
|
if (age > 12) color = "CadetBlue"
|
||||||
else color = "Aquamarine"
|
else color = "Aquamarine"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,4 +41,3 @@ Generally writen as a *sequencial unformated* file.
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- https://www.maths.town/fractal-articles/mandelbulb/mandelbulb-all-powers/
|
- https://www.maths.town/fractal-articles/mandelbulb/mandelbulb-all-powers/
|
||||||
- https://discuss.pixls.us/t/intriguing-shapes-in-buddhabrot-like-fractals/41816
|
|
||||||
|
Loading…
Reference in New Issue
Block a user