update noisepictures

This commit is contained in:
tTh
2023-06-09 23:59:54 +02:00
parent c2648077f2
commit 920a864b22
4 changed files with 141 additions and 34 deletions

View File

@@ -21,7 +21,8 @@ trigofest: trigofest.f90 Makefile vue3axes.o utils_ga.o
utils_ga.o -o $@
noisepic: noisepic.f90 Makefile
gfortran $(GFOPT) $< ../Modules/spitpgm.o ../Modules/pixrgb.o \
gfortran $(GFOPT) $< ../Modules/spitpgm.o ../Modules/pixrgb.o \
../Modules/noisepictures.o \
-o $@
# ---- modules locaux

View File

@@ -2,6 +2,7 @@ program noisepic
use spitpgm
use pixrgb
use noisepictures
implicit none
integer :: numframe = 0
@@ -17,11 +18,11 @@ program noisepic
read (arg, *) numframe
endif
ranges(0) = 10 ; ranges(2) = 90
ranges(1) = 10 ; ranges(2) = 90
ranges(3) = 110 ; ranges(4) = 166
ranges(5) = 205 ; ranges(6) = 230
nbre = 1000+(numframe*555)
call make_noise_color_range_pic(numframe, ranges, nbre)
call make_noise_bw_pic (numframe)
contains
!-- ------------------------------------------------------------------
@@ -44,33 +45,13 @@ subroutine make_noise_bw_pic (value)
foo = irand()
print *, 'val=', value, ' rnd=', foo
call plot_noise_bw_pic(pic, 15000)
! call plot_noise_bw_pic(pic, 15000)
call noise_gray8_pic(pic, 15000)
write (filename, "(a, i5.5, a)") "", value, ".pgm"
call spit_as_pgm_8(pic, trim(filename))
end subroutine
!-- ------------------------------------------------------------------
subroutine plot_noise_bw_pic(picz, nbre)
implicit none
integer, dimension(:,:), intent(inout) :: picz
integer, intent(in) :: nbre
integer :: width, height
integer :: quux, ix, iy, iv
width = ubound(picz, 1) ; height = ubound(picz, 2)
! print *, 'sz picz', width, height
do quux=1, nbre
ix = 1 + mod ( irand(), width )
iy = 1 + mod ( irand(), height )
iv = mod ( irand(), 256 )
! print *, ix, iy
picz(ix, iy) = iv
enddo
end subroutine
!-- ------------------------------------------------------------------
!-
!- Colorized