Compare commits
5 Commits
6d5c8d6c5f
...
de43a1810c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de43a1810c | ||
|
|
31c9d1a802 | ||
|
|
54b2893209 | ||
|
|
78384c7e42 | ||
|
|
95e89f0c5f |
@@ -85,13 +85,13 @@ module bloubspace
|
|||||||
blb%pz = coefxyz * (rand() - 0.50)
|
blb%pz = coefxyz * (rand() - 0.50)
|
||||||
|
|
||||||
blb%vx = (rand() / 9.000)
|
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)
|
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)
|
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%red = mod(irand(), 256)
|
||||||
blb%green = 127 + mod(irand(), 127)
|
blb%green = 127 + mod(irand(), 127)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
INCFILE="WS/bloubs.inc"
|
INCFILE="WS/bloubs.inc"
|
||||||
TMPPNG="/dev/shm/bloubs7.png"
|
TMPPNG="/dev/shm/bloubs7.png"
|
||||||
NBIMG=2000
|
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"
|
DDIR="frames/a"
|
||||||
LOGERR="log.error"
|
LOGERR="log.error"
|
||||||
TXTCOLOR="#db4090"
|
TXTCOLOR="#db4090"
|
||||||
@@ -32,7 +32,7 @@ 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 parametrizable
|
# --> this function need to be parametrizable
|
||||||
#
|
#
|
||||||
./genbloubs ${BLBS_IN} 2000
|
./genbloubs ${BLBS_IN} 3333
|
||||||
|
|
||||||
for idx in $(seq 0 $((NBIMG-1)) )
|
for idx in $(seq 0 $((NBIMG-1)) )
|
||||||
do
|
do
|
||||||
@@ -61,16 +61,12 @@ do
|
|||||||
|
|
||||||
convert ${TMPPNG} \
|
convert ${TMPPNG} \
|
||||||
-font Courier-Bold \
|
-font Courier-Bold \
|
||||||
-pointsize 32 \
|
-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 "$count" \
|
||||||
-gravity north-east \
|
|
||||||
-annotate +45+5 "$count" \
|
|
||||||
-gravity north-west \
|
|
||||||
-annotate +45+5 "BloubWorld" \
|
|
||||||
$PNG
|
$PNG
|
||||||
|
|
||||||
echo ' ' $PNG '[done]'
|
echo ' ' $PNG '[done]'
|
||||||
|
|||||||
@@ -21,10 +21,9 @@ global_settings {
|
|||||||
#write (LC, " ", Nb_Bloubs, "\n")
|
#write (LC, " ", Nb_Bloubs, "\n")
|
||||||
#fclose LC
|
#fclose LC
|
||||||
|
|
||||||
|
|
||||||
object {
|
object {
|
||||||
Bloubs
|
Bloubs
|
||||||
finish { phong 0.57 specular 0.57 }
|
finish { phong 0.47 specular 0.47 }
|
||||||
}
|
}
|
||||||
|
|
||||||
#declare La_Boite = object
|
#declare La_Boite = object
|
||||||
@@ -36,8 +35,8 @@ union {
|
|||||||
plane { <0, 1, 0>, 27 }
|
plane { <0, 1, 0>, 27 }
|
||||||
plane { <0, 0, 1>, 69 }
|
plane { <0, 0, 1>, 69 }
|
||||||
texture {
|
texture {
|
||||||
pigment { color srgb <0.225, 0.244, 0.211> }
|
pigment { color srgb <0.35, 0.44, 0.43> }
|
||||||
finish { phong 0.18 metallic 0.25 reflection 0.35 }
|
finish { phong 0.18 ambient 0.25 reflection 0.35 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +65,8 @@ union {
|
|||||||
cylinder { -SC*z, SC*z, 0.04 }
|
cylinder { -SC*z, SC*z, 0.04 }
|
||||||
}
|
}
|
||||||
texture {
|
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, -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 { < BH, 0, 0>, <-BH, 0, 0>, Rud }
|
||||||
cylinder { < 0, 0, -BH>, < 0, 0, BH>, Rud }
|
// cylinder { < 0, 0, -BH>, < 0, 0, BH>, Rud }
|
||||||
}
|
}
|
||||||
texture {
|
texture {
|
||||||
pigment { color Gray50 }
|
pigment { color Gray50 }
|
||||||
@@ -126,7 +126,7 @@ union {
|
|||||||
object { Un_Cadre translate y*(BV-E) }
|
object { Un_Cadre translate y*(BV-E) }
|
||||||
object { Un_Cadre translate -y*(BV-E) }
|
object { Un_Cadre translate -y*(BV-E) }
|
||||||
|
|
||||||
object { Montants }
|
// object { Montants }
|
||||||
|
|
||||||
#local G = Green * 0.80;
|
#local G = Green * 0.80;
|
||||||
object { Une_Borne translate <-BH, 0, -BH> pigment { color Blue*0.9 } }
|
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 { < 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 XCAM = 10 - ( 20 * NormClock);
|
||||||
#declare YCAM = -1.1 + (1.25 * NormClock);
|
#declare YCAM = -1.1 + (2.26 * NormClock);
|
||||||
#declare ZCAM = -19.20;
|
#declare ZCAM = -23.00;
|
||||||
|
|
||||||
#declare XLAT = 0;
|
#declare XLAT = 0;
|
||||||
#declare YLAT = 0;
|
#declare YLAT = 0;
|
||||||
@@ -174,5 +174,7 @@ 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 55
|
||||||
}
|
}
|
||||||
|
// ----------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
1
Modules/.gitignore
vendored
1
Modules/.gitignore
vendored
@@ -3,6 +3,7 @@ chkpixels
|
|||||||
twavm
|
twavm
|
||||||
trnd
|
trnd
|
||||||
t_centermag
|
t_centermag
|
||||||
|
demo_spitpgm
|
||||||
|
|
||||||
datas/
|
datas/
|
||||||
|
|
||||||
|
|||||||
@@ -65,3 +65,6 @@ trnd: trnd.f90 Makefile libtth90modules.a
|
|||||||
twavm: twavm.f90 Makefile libtth90modules.a
|
twavm: twavm.f90 Makefile libtth90modules.a
|
||||||
gfortran $(GFOPT) $< libtth90modules.a -o $@
|
gfortran $(GFOPT) $< libtth90modules.a -o $@
|
||||||
|
|
||||||
|
demo_spitpgm: demo_spitpgm.f90 Makefile libtth90modules.a
|
||||||
|
gfortran $(GFOPT) $< libtth90modules.a -o $@
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ This is just a [WIP](./wavmetrics.f90), see [twavm](./twavm.f90) for a no-use ca
|
|||||||
|
|
||||||
### spitpgm
|
### 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
|
### pixrgb
|
||||||
|
|
||||||
|
|||||||
21
Modules/SpitPGM.md
Normal file
21
Modules/SpitPGM.md
Normal 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
18
Modules/demo_spitpgm.f90
Normal 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
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ end subroutine
|
|||||||
!-------------------------------------------------------------------
|
!-------------------------------------------------------------------
|
||||||
!-
|
!-
|
||||||
! 16 bits - 65535 levels portable grey map file
|
! 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)
|
subroutine spit_as_pgm_16(pic, fname)
|
||||||
integer, intent(in), dimension (:,:) :: pic
|
integer, intent(in), dimension (:,:) :: pic
|
||||||
@@ -69,6 +69,7 @@ subroutine spit_as_pgm_16(pic, fname)
|
|||||||
do ix=1, ubound(pic, 1)
|
do ix=1, ubound(pic, 1)
|
||||||
foo = pic(ix, iy)
|
foo = pic(ix, iy)
|
||||||
if (foo .GT. 65535) foo = 65535
|
if (foo .GT. 65535) foo = 65535
|
||||||
|
if (foo .LT. 0) foo = 0
|
||||||
write(io, "(i0)") foo
|
write(io, "(i0)") foo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
@@ -96,6 +97,7 @@ subroutine spit_as_pgm_8(pic, fname)
|
|||||||
do ix=1, ubound(pic, 1)
|
do ix=1, ubound(pic, 1)
|
||||||
foo = pic(ix, iy)
|
foo = pic(ix, iy)
|
||||||
if (foo .GT. 255) foo = 255
|
if (foo .GT. 255) foo = 255
|
||||||
|
if (foo .LT. 0) foo = 0
|
||||||
write(io, "(i0)") foo
|
write(io, "(i0)") foo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ program essai
|
|||||||
|
|
||||||
! integer :: foo, bar
|
! integer :: foo, bar
|
||||||
|
|
||||||
write(0, *) "----------------- essai -------------------"
|
write(0, *) "------------ essai random -------------"
|
||||||
|
|
||||||
call init_random_seed() ! in module 'mathstuff'
|
call init_random_seed() ! in module 'mathstuff'
|
||||||
! call test_noisepictures_rgb()
|
! call test_noisepictures_rgb()
|
||||||
|
|||||||
Reference in New Issue
Block a user