2022-02-08 02:20:42 +11:00
|
|
|
!-----------------------------------------------------
|
2022-12-30 12:06:00 +11:00
|
|
|
! MANDELBROT SET
|
|
|
|
!-
|
|
|
|
! refactored Thu 29 Dec 2022 03:21:16 PM CET
|
2022-12-31 23:25:02 +11:00
|
|
|
! refactored Sat 31 Dec 2022 12:37:03 PM CET
|
|
|
|
! all generative parts are now in 'mandelbrots.f90' module
|
2022-12-30 12:06:00 +11:00
|
|
|
!-
|
2022-02-08 02:20:42 +11:00
|
|
|
!-----------------------------------------------------
|
|
|
|
!
|
|
|
|
! this is the main programm
|
|
|
|
!
|
2022-02-12 23:34:44 +11:00
|
|
|
program mkmandel
|
2022-12-27 11:29:04 +11:00
|
|
|
use pixrgb
|
2022-12-31 23:25:02 +11:00
|
|
|
use mandelbrots
|
2022-02-08 02:20:42 +11:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
2022-12-27 11:29:04 +11:00
|
|
|
type(t_pixrgb), allocatable :: pic(:,:)
|
2022-02-08 02:20:42 +11:00
|
|
|
integer :: angle
|
|
|
|
real :: radangle, radius
|
|
|
|
real :: stx, sty
|
|
|
|
character (len=80) :: filename
|
|
|
|
|
2022-12-30 12:06:00 +11:00
|
|
|
write(0, *) "-------- making some mandelbrot -------"
|
2022-02-08 02:20:42 +11:00
|
|
|
|
2023-05-03 11:46:52 +11:00
|
|
|
allocate(pic(640, 480))
|
2022-12-28 05:59:07 +11:00
|
|
|
|
2023-05-03 11:46:52 +11:00
|
|
|
do angle = 0, 2000
|
2022-12-27 11:29:04 +11:00
|
|
|
|
|
|
|
call rgbpix_set_to_zero(pic)
|
2022-02-08 02:20:42 +11:00
|
|
|
|
2022-12-30 12:06:00 +11:00
|
|
|
radangle = float(angle) * 0.01664
|
2022-12-31 23:25:02 +11:00
|
|
|
radius = float(angle) / 2000.0
|
2022-12-27 11:29:04 +11:00
|
|
|
write (filename, "(a, i5.5, a)") "frames/mandel/", angle, ".pnm"
|
2022-02-08 02:20:42 +11:00
|
|
|
! filename = trim(filename)
|
2023-05-03 11:46:52 +11:00
|
|
|
write(0,*) "passe ", angle, radangle, trim(filename)
|
2022-02-08 02:20:42 +11:00
|
|
|
|
2023-05-03 11:46:52 +11:00
|
|
|
stx = radius * (sin(radangle*4.07) + 0.2131*sin(radangle*11.36))
|
|
|
|
sty = radius * (cos(radangle*6.21) + 0.2725*cos(radangle*10.99))
|
2022-02-08 02:20:42 +11:00
|
|
|
|
2022-12-31 23:25:02 +11:00
|
|
|
call mandelbrot_one(pic, complex(stx, sty))
|
2022-12-27 11:29:04 +11:00
|
|
|
call rgbpix_spit_as_pnm_8 (pic, trim(filename))
|
2022-02-08 02:20:42 +11:00
|
|
|
|
2022-12-31 23:25:02 +11:00
|
|
|
enddo
|
2022-02-08 02:20:42 +11:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
!-----------------------------------------------------
|