Fortraneries/GrafAnim/doublegauss.f90

34 lines
832 B
Fortran
Raw Normal View History

2023-02-12 06:29:07 +11:00
program doublegauss
use pixrgb
use utils_ga
implicit none
type(t_pixrgb), allocatable :: pic(:,:)
2023-05-07 18:47:49 +11:00
character (len=280) :: filename
2023-02-12 06:29:07 +11:00
integer :: pass, iter
integer :: xrnd, yrnd
write(0, *) "----- making a doublegauss picture ----"
allocate(pic(320, 240))
call rgbpix_set_to_zero(pic)
do pass=0, 99
do iter=1, 15000
xrnd = fair_random_gauss(320)
yrnd = fair_random_gauss(240)
! print *, xrnd, yrnd
pic(xrnd,yrnd)%r = pic(xrnd,yrnd)%r + 1
pic(xrnd,yrnd)%g = pic(xrnd,yrnd)%g + 2
pic(xrnd,yrnd)%b = pic(xrnd,yrnd)%b + 3
end do
write (filename, "(a, i5.5, a)") "F/DBG/", pass, ".pnm"
print *, trim(filename)
call rgbpix_spit_as_pnm_8 (pic, trim(filename))
end do
end program