Compare commits

..

6 Commits

Author SHA1 Message Date
tTh
d7da858380 cramicule is comming ! 2026-06-25 10:09:03 +02:00
tTh
de43a1810c cranicule is here 2026-06-25 06:43:33 +02:00
tTh
31c9d1a802 add a molly-guard 2026-06-25 06:29:55 +02:00
tTh
54b2893209 pimping the scene 2026-06-17 14:00:43 +02:00
tTh
78384c7e42 more bloubs, less text 2026-06-17 07:37:17 +02:00
tTh
95e89f0c5f change the V setup 2026-06-17 07:36:14 +02:00
28 changed files with 134 additions and 72 deletions

View File

@@ -82,5 +82,7 @@ par exemple le barycentre des bloubs. Et c'est très facile
- Réfléchir à une politique de vieillissement des bloubs
- le `merge` de deux bloubs est-il un acte politique ?
.

View File

@@ -84,14 +84,14 @@ module bloubspace
blb%py = coefxyz * (rand() - 0.50)
blb%pz = coefxyz * (rand() - 0.50)
blb%vx = (rand() / 9.000)
! if (blb%px .LT. 0.0) blb%vx = -blb%vx
blb%vx = (rand() / 6.000)
if (blb%px .LT. 0.0) blb%vx = -blb%vx
blb%vy = -0.10 + (rand() / 11.000)
! if (blb%py .LT. 0.0) blb%vy = -blb%vy
if (blb%py .LT. 0.0) blb%vy = -blb%vy
blb%vz = (rand() / 10.000)
! if (blb%pz .LT. 0.0) blb%vz = -blb%vz
if (blb%pz .LT. 0.0) blb%vz = -blb%vz
blb%red = mod(irand(), 256)
blb%green = 127 + mod(irand(), 127)

View File

@@ -42,4 +42,4 @@ program genbloubs
close(unit=idu)
end program
end program

View File

@@ -54,7 +54,7 @@ program movebloubs
do
read (unit=inu, iostat=errcode) bloub
if (0 .ne. errcode) then
! may be we got an EOF ?
! may be we got an EOF ? XXX
exit
endif
@@ -97,16 +97,18 @@ program movebloubs
! ok, we have read all the bloubs from the input file
! insert some fancy conditional here
if (compteur .LT. 50) then
call add_more_bloubs(outu, 5, 0.046)
! insert some fancy conditional here for adding new
! bloubs to the bloubiverse
if (compteur .LT. 180) then
write (0, *) '... rearmement demographique ...'
call add_more_bloubs(outu, 19, 0.046)
endif
rnd = rand()
! write(0, *) 'rnd= ', rnd
if (rnd .LT. 0.18) then
write (0, *) '... random of life ...'
call add_more_bloubs(outu, 5, 0.056)
write (0, *) '... the random of life ...'
call add_more_bloubs(outu, 15, 0.056)
endif
close(inu) ; close(outu)

View File

@@ -8,7 +8,7 @@
INCFILE="WS/bloubs.inc"
TMPPNG="/dev/shm/bloubs7.png"
NBIMG=2000
POVOPT="+Q9 +a -v -d Declare=NbFrames=$NBIMG -W1920 -H1080 -WT4"
POVOPT="+Q9 +a -v -d Declare=NbFrames=$NBIMG -W1200 -H900 -WT4"
DDIR="frames/a"
LOGERR="log.error"
TXTCOLOR="#db4090"
@@ -32,7 +32,7 @@ fi
# first, we have to make a seminal buch of bloubs
# --> this function need to be parametrizable
#
./genbloubs ${BLBS_IN} 2000
./genbloubs ${BLBS_IN} 333
for idx in $(seq 0 $((NBIMG-1)) )
do
@@ -54,23 +54,19 @@ do
fi
td=$(date -u +'%F %R' | tr '01' 'ol')
hi=$(printf "#%04d" $idx | tr '01' 'ol')
hi=$(printf "\$%03x" $idx | tr '01' 'ol')
count=$(tail -1 "WS/log.nb_bloubs" | tr '01' 'ol')
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
convert ${TMPPNG} \
-font Courier-Bold \
-pointsize 32 \
-pointsize 28 \
-fill "$TXTCOLOR" \
-gravity south-east \
-annotate +25+5 "$td" \
-gravity south-west \
-annotate +25+5 "$hi" \
-gravity north-east \
-annotate +45+5 "$count" \
-gravity north-west \
-annotate +45+5 "BloubWorld" \
-gravity south-west \
-annotate +25+5 "$count" \
$PNG
echo ' ' $PNG '[done]'
@@ -80,7 +76,7 @@ do
# mv ${BLBS_OUT} ${BLBS_IN}
echo "### run done"
sleep 5
sleep 15
done

View File

@@ -13,6 +13,10 @@ global_settings {
#declare NormClock = clock / NbFrames;
#macro Cos_010( X )
(0.5-0.5*cos(2*3.141592654*X))
#end
// ----------------------------------------------------------
#include "WS/bloubs.inc"
@@ -21,10 +25,9 @@ global_settings {
#write (LC, " ", Nb_Bloubs, "\n")
#fclose LC
object {
Bloubs
finish { phong 0.57 specular 0.57 }
finish { phong 0.47 specular 0.47 }
}
#declare La_Boite = object
@@ -36,8 +39,8 @@ union {
plane { <0, 1, 0>, 27 }
plane { <0, 0, 1>, 69 }
texture {
pigment { color srgb <0.225, 0.244, 0.211> }
finish { phong 0.18 metallic 0.25 reflection 0.35 }
pigment { color srgb <0.48, 0.54, 0.52> }
finish { phong 0.18 ambient 0.25 reflection 0.35 }
}
}
}
@@ -66,7 +69,8 @@ union {
cylinder { -SC*z, SC*z, 0.04 }
}
texture {
pigment { color Gray50 }
pigment { color Gray70 }
finish { emission 0.975 }
}
}
@@ -96,8 +100,8 @@ merge {
cylinder { < BH, 0, -BH>, < BH, 0, BH>, Ruc }
cylinder { < BH, 0, -BH>, <-BH, 0, -BH>, Ruc }
cylinder { < BH, 0, BH>, <-BH, 0, BH>, Ruc }
cylinder { < BH, 0, 0>, <-BH, 0, 0>, Rud }
cylinder { < 0, 0, -BH>, < 0, 0, BH>, Rud }
// cylinder { < BH, 0, 0>, <-BH, 0, 0>, Rud }
// cylinder { < 0, 0, -BH>, < 0, 0, BH>, Rud }
}
texture {
pigment { color Gray50 }
@@ -126,7 +130,7 @@ union {
object { Un_Cadre translate y*(BV-E) }
object { Un_Cadre translate -y*(BV-E) }
object { Montants }
// object { Montants }
#local G = Green * 0.80;
object { Une_Borne translate <-BH, 0, -BH> pigment { color Blue*0.9 } }
@@ -160,11 +164,12 @@ union {
// ----------------------------------------------------------
light_source { < 19, 12+NormClock, -17> color Gray80 }
light_source { <-14, 10-NormClock, -29> color Gray70 }
light_source { <-14, 10-NormClock, -29> color Gray80 }
#declare XCAM = 5 - ( 10 * NormClock);
#declare YCAM = -1.1 + (1.25 * NormClock);
#declare ZCAM = -19.20;
#declare XCAM = 20 - ( 40 * NormClock);
#declare YCAM = -1.1 + (2.26 * NormClock);
#declare ZCAM = -23.00;
#declare ACAM = 55 - (12*Cos_010(NormClock));
#declare XLAT = 0;
#declare YLAT = 0;
@@ -174,5 +179,7 @@ camera {
location <XCAM, YCAM, ZCAM>
look_at <XLAT, YLAT, ZLAT>
right x*image_width/image_height
angle 64
angle 55
}
// ----------------------------------------------------------

View File

@@ -8,6 +8,7 @@
BEGIN {
count = 0
bx = by = bz = 0.0
print "// --------------------------------"
print "// GENERATED FILE, DON'T TOUCH IT !"
print "// --------------------------------"
print
@@ -21,19 +22,21 @@ BEGIN {
color = "Cyan"
if (merged) {
if (age > 150) color = "Orange"
else color = "Yellow"
if (age > 150) color = "OrangeRed"
else color = "GreenYellow"
}
else {
if (age > 150) color = "DarkGreen"
else color = "Aquamarine"
}
if (age < 18) color = "Gray40"
if (age < 9) color = "Blue"
if (age < 9) color = "LimeGreen"
# calcul barycentre
bx += $1
by += $2
bz += $3
pigment = "pigment { color " color " }"
printf "\tsphere { <%f, %f, %f>, %f \n\t\t%s }\n", \
$1, $2, $3, $4, pigment

View File

@@ -2,7 +2,7 @@
all: essai voxelize evolvopick pickover \
mkjulia mklorentz mkmandel
GFOPT = -Wall -Wextra -time -g -Imods/ -I../Modules
GFOPT = -Wall -Wextra -Imods/ -I../Modules
# ---------------------------------------------
# the module 'spitpgm' is now in $PROJECT/Modules

View File

@@ -1,4 +1,4 @@
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
POVOPT=" -d +q9 +a +W800 +H600 -v +WT2"

View File

@@ -25,15 +25,15 @@ echo "file type :" $filetype
#
case $filetype in
PNG) extension=".png" ;;
Netpbm) extension=".pgm" ;;
Netpbm) extension=".pnm" ;;
*) extension=".binary" ;;
esac
echo "extension :" $extension
TITLE='---{ voxelisation experimentale }---'
TITLE='---{ fortranerie experimentale }---'
ffmpeg -nostdin \
-loglevel warning \
-y -r 30 -f image2 -i $SDIR/%05d.png \
-y -r 30 -f image2 -i $SDIR/%05d$extension \
-metadata artist='--{ tTh des Bourtoulots }--' \
-metadata title="${TITLE}" \
-preset veryslow \

View File

@@ -93,9 +93,9 @@ subroutine julia_colormapped(pic, cx, cy, mag, maxiter)
endif
end do
if (over_iter) then
pic(ix, iy)%r = mod(int(modulus2(Z)*2000.0), 255)
pic(ix, iy)%g = mod(abs(int(real(Z) *11.0)), 255)
pic(ix, iy)%b = mod(abs(int(aimag(Z)*11.0)), 255)
pic(ix, iy)%r = mod(int(modulus2(Z)*1337.0), 255)
pic(ix, iy)%g = mod(abs(int(real(Z) *17.0)), 255)
pic(ix, iy)%b = mod(abs(int(aimag(Z)*17.0)), 255)
print *, ix, iy, Z, modulus2(Z)
over = over + 1
else

View File

@@ -42,10 +42,10 @@ subroutine mandelbrot_one(pic, start)
! enter megaloop
!
do iy = 1, height
fy = (float(iy) / float(height/3)) - 1.5
fy = (float(iy) / float(height/2)) - 1.0
!! print *, "line ", iy, fy
do ix = 1, width
fx = (float(ix) / float(width/3)) - 2.0
fx = (float(ix) / float(width/2)) - 1.4
!-------------------------------------
! working on the current pixel
za = start

View File

@@ -45,13 +45,13 @@ do
-font Courier-Bold \
-pointsize 20 \
-fill Yellow \
-annotate +15+34 $tcx \
-annotate +15+58 $tcy \
-gravity South-East \
-annotate +18+34 $tcx \
-annotate +18+58 $tcy \
-gravity South \
-font Courier \
-pointsize 14 \
-fill Yellow \
-annotate +10+6 "Konrad+tTh 2024" \
-annotate +0+9 "Konrad+tTh 2026" \
$img
done

View File

@@ -23,7 +23,7 @@ program mkmandel
write(0, *) "-------- making some mandelbrot -------"
allocate(pic(1920, 1080))
allocate(pic(1024, 780))
do angle = 0, 2000
@@ -35,6 +35,7 @@ program mkmandel
! filename = trim(filename)
write(0,*) "passe ", angle, radangle, trim(filename)
! compute the 'perturbation'
stx = radius * (sin(radangle*4.07) + 0.2131*cos(radangle*11.36))
sty = radius * (sin(radangle*6.21) + 0.2725*cos(radangle*10.99))

View File

@@ -31,11 +31,11 @@ do
if [ $? -ne 0 ] ; then
echo "ERROR ERROR ERROR ERROR ERROR ERROR"
tail -15 WS/toto.err
sleep 20
sleep 200
#exit 1
fi
titre='Voxelisation - tTh - Avril 2022'
titre='Voxelisation - tTh - Juin 2026'
numbers=$(tail -1 WS/camvox.log | \
awk '{printf " K=%5d : %6.3f %6.3f %6.3f", \
$1, $2, $3, $4}')
@@ -45,11 +45,11 @@ do
convert ${TMPNG} \
-fill Orange \
-kerning 2 \
-pointsize 32 \
-font AvantGarde-Book \
-gravity South-West \
-pointsize 20 \
-annotate +20+45 "$titre" \
-pointsize 24 \
-pointsize 14 \
-annotate +20+10 "$numbers" \
\
$dst
@@ -62,3 +62,4 @@ do
done
./encode.sh frames/voxel/ voxel-3.mp4

View File

@@ -1,4 +1,4 @@
# Modules
# Modules fraktallistes
Premier point : trouver les bonnes options de gfortran pour
@@ -9,5 +9,7 @@ avec un script de build bien robuste.
Troisième point : Faire la [documentation](documentation.md)
Quatrilème point : Cultiver la techno-futilité.
Quatrillème point : Cultiver la techno-futilité, une des choses
qui nous évitera de devenir dingues dans ce monde actuel en
décomposition.

View File

@@ -1,7 +1,7 @@
# La doc des modules (enfin !)
Non, détrompez-vous, ce n'est pas vraiment une doc, parce que
les codes des modules du fraktalisme est en perpétuelle évolution.
les codes des modules du fraktalisme sont en perpétuelle évolution.
## Points 3d

View File

@@ -7,7 +7,7 @@
#version 3.7;
global_settings {
ambient_light rgb <0.04, 0.04, 0.04>
ambient_light rgb <0.06, 0.06, 0.06>
assumed_gamma 1.0
}
//----------------------------------------------------------------
@@ -16,8 +16,7 @@ global_settings {
#declare VOXEL = object
{
// sphere { 0, 1.18 }
#local D = 2.11;
#local D = 3.85;
box { <-D, -D, -D>, <D, D, D> }
}
@@ -33,14 +32,13 @@ object {
*/
#local TRK = DIMC/2.0000000;
translate <-TRK, -TRK, -TRK>
// rotate <clock*0.22, 0, clock*0.17>
}
//----------------------------------------------------------------
#declare TriAxe = object
{
#local Sz = 300;
#local Ra = 0.20;
#local Ra = 0.25;
union {
cylinder { <-Sz, 0, 0>, <Sz, 0, 0>, Ra pigment { color Red } }
cylinder { <0, -Sz, 0>, <0, Sz, 0>, Ra pigment { color Green } }
@@ -62,7 +60,7 @@ plane {
light_source { <-29, 45, -27> color Gray70 }
light_source { <-52, 5, -48> color Yellow*0.45 }
light_source { < 59, 45, 48> color Gray20 }
light_source { < 59, -45, 48> color Gray20 }
light_source { < 59, -45, 48> color Gray40 }
light_source { < 9, 59, 18> color Red*0.65 }
light_source { < 8, -48, 3> color Green*0.75 }
@@ -97,4 +95,3 @@ camera {
}
//----------------------------------------------------------------
//----------------------------------------------------------------

View File

@@ -9,7 +9,7 @@ program voxelize
implicit none
integer, parameter :: DIMC = 451
integer, parameter :: DIMC = 512
integer, dimension(:,:,:), allocatable :: cube
type(t_point3d), dimension(:), allocatable :: points
integer :: errcode, foo, argc

View File

@@ -21,7 +21,7 @@ program animation
type(massbody) :: planets(NB_BODY)
call init_random()
call create_some_planets(planets, 1664.3, IMG_WIDTH , IMG_HEIGHT)
call create_some_planets(planets, 1.4e4, IMG_WIDTH , IMG_HEIGHT)
call print_barycentre_bodies(planets, 'begin')
call la_grande_boucle(0, 667, planets)

1
Modules/.gitignore vendored
View File

@@ -3,6 +3,7 @@ chkpixels
twavm
trnd
t_centermag
demo_spitpgm
datas/

View File

@@ -65,3 +65,6 @@ trnd: trnd.f90 Makefile libtth90modules.a
twavm: twavm.f90 Makefile libtth90modules.a
gfortran $(GFOPT) $< libtth90modules.a -o $@
demo_spitpgm: demo_spitpgm.f90 Makefile libtth90modules.a
gfortran $(GFOPT) $< libtth90modules.a -o $@

View File

@@ -11,7 +11,8 @@ This is just a [WIP](./wavmetrics.f90), see [twavm](./twavm.f90) for a no-use ca
### spitpgm
Write gray level 2d buffer (aka picture) to disk in the NetPNM format.
Some procedures to [write gray level](./SpitPGM.md) 2d buffer of integer
(aka picture) to disk in the *ascii* NetPNM format.
### pixrgb

21
Modules/SpitPGM.md Normal file
View File

@@ -0,0 +1,21 @@
# SpitPGM
What is a `.pgm` file ? And what we can do with this module ?
You have a bi-dimensionnal array of integer and you want show those
fancy datas as a fancy picture ? So we have a few funcs for doing
that..
```
subroutine spit_as_pgm_16(pic, fname)
integer, intent(in), dimension (:,:) :: pic
character (len=*), intent(in) :: fname
```
and
```
subroutine spit_as_pgm_16(pic, fname)
integer, intent(in), dimension (:,:) :: pic
character (len=*), intent(in) :: fname
```

5
Modules/WS/README.md Normal file
View File

@@ -0,0 +1,5 @@
This is the *Work Space* for various temporary files.

18
Modules/demo_spitpgm.f90 Normal file
View File

@@ -0,0 +1,18 @@
program demo_spitpgm
use spitpgm
integer :: fancydatas(128, 128)
integer :: i, j
fancydatas = 0
do i=1, 128
do j=1, 128
fancydatas(i,j) = mod(i*j, 65000)
enddo
enddo
call spit_as_pgm_16(fancydatas, 'fancydatas.pgm')
end program

View File

@@ -49,7 +49,7 @@ end subroutine
!-------------------------------------------------------------------
!-
! 16 bits - 65535 levels portable grey map file
! no data conversion except upper clippin.
! no data conversion except upper clipping.
!-
subroutine spit_as_pgm_16(pic, fname)
integer, intent(in), dimension (:,:) :: pic
@@ -69,6 +69,7 @@ subroutine spit_as_pgm_16(pic, fname)
do ix=1, ubound(pic, 1)
foo = pic(ix, iy)
if (foo .GT. 65535) foo = 65535
if (foo .LT. 0) foo = 0
write(io, "(i0)") foo
enddo
enddo
@@ -96,6 +97,7 @@ subroutine spit_as_pgm_8(pic, fname)
do ix=1, ubound(pic, 1)
foo = pic(ix, iy)
if (foo .GT. 255) foo = 255
if (foo .LT. 0) foo = 0
write(io, "(i0)") foo
enddo
enddo

View File

@@ -8,7 +8,7 @@ program essai
! integer :: foo, bar
write(0, *) "----------------- essai -------------------"
write(0, *) "------------ essai random -------------"
call init_random_seed() ! in module 'mathstuff'
! call test_noisepictures_rgb()