Compare commits

...

5 Commits

Author SHA1 Message Date
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
10 changed files with 71 additions and 27 deletions

View File

@@ -85,13 +85,13 @@ module bloubspace
blb%pz = coefxyz * (rand() - 0.50)
blb%vx = (rand() / 9.000)
! if (blb%px .LT. 0.0) blb%vx = -blb%vx
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

@@ -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} 3333
for idx in $(seq 0 $((NBIMG-1)) )
do
@@ -61,16 +61,12 @@ do
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" \
-annotate +25+5 "$count" \
$PNG
echo ' ' $PNG '[done]'

View File

@@ -21,10 +21,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 +35,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.35, 0.44, 0.43> }
finish { phong 0.18 ambient 0.25 reflection 0.35 }
}
}
}
@@ -66,7 +65,8 @@ union {
cylinder { -SC*z, SC*z, 0.04 }
}
texture {
pigment { color Gray50 }
pigment { color Gray70 }
finish { emission 0.975 }
}
}
@@ -96,8 +96,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 +126,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 +160,11 @@ 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 = 10 - ( 20 * NormClock);
#declare YCAM = -1.1 + (2.26 * NormClock);
#declare ZCAM = -23.00;
#declare XLAT = 0;
#declare YLAT = 0;
@@ -174,5 +174,7 @@ camera {
location <XCAM, YCAM, ZCAM>
look_at <XLAT, YLAT, ZLAT>
right x*image_width/image_height
angle 64
angle 55
}
// ----------------------------------------------------------

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
```

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()