winter is coming

This commit is contained in:
tTh
2023-10-10 22:08:50 +02:00
parent 098b12cd61
commit 462d24b717
4 changed files with 87 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ GFOPT = -Wall -Wextra -g -I.
all: chkpixels trnd t
# -----------------------------------------------
# ---------------------------------------------------------
spitpgm.o: spitpgm.f90 Makefile
gfortran $(GFOPT) -c $<
@@ -31,8 +31,7 @@ mathstuff2.o: mathstuff2.f90 Makefile
noisepictures.o: noisepictures.f90 Makefile
gfortran $(GFOPT) -c $<
#
#----------------------------------------------------------
# making a fluffy archive
#
OBJECTS = spitpgm.o pixrgb.o \
@@ -43,7 +42,7 @@ OBJECTS = spitpgm.o pixrgb.o \
libtth90modules.a: $(OBJECTS) Makefile
$(AR) rs $@ $?
#
#----------------------------------------------------------
# programmes de testouille
#

View File

@@ -85,20 +85,23 @@ subroutine noise_range_rgb16_pic(prgb, rngs, nbre)
type(t_pixrgb), dimension(:,:), intent(inout) :: prgb
integer, intent(in) :: rngs(6)
integer, intent(in) :: nbre
integer :: quux, ix, iy, width, height
integer :: foo, ix, iy
print *, 'noise rgb16 range', nbre
print *, 'ranges:'
print *, rngs
! print *, 'noise rgb16 range', nbre
! print *, 'rngs', rngs
width = ubound(prgb, 1) ; height = ubound(prgb, 2)
do foo = 1, nbre
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%r = rngs(1) + mod(irand(), rngs(2) - rngs(1))
do quux=1, nbre
ix = 1 + mod ( irand(), width )
iy = 1 + mod ( irand(), height )
prgb(ix, iy)%r = mod ( irand(), 65536 )
prgb(ix, iy)%g = mod ( irand(), 65536 )
prgb(ix, iy)%b = mod ( irand(), 65536 )
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%g = rngs(3) + mod(irand(), rngs(4) - rngs(3))
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%b = rngs(5) + mod(irand(), rngs(6) - rngs(5))
enddo
end subroutine

View File

@@ -11,9 +11,9 @@ program essai
write(0, *) "----------------- essai -------------------"
call init_random_seed() ! in module 'mathstuff'
call test_noisepictures_rgb()
! call test_noisepictures_rgb()
call test_noisepictures_rgb_range()
call test_noisepictures_gray()
! call test_noisepictures_gray()
contains
!-----------------------------------------------------------------------