Compare commits

...

2 Commits

Author SHA1 Message Date
tTh
e099b398f3 first public release 2022-12-27 19:59:07 +01:00
tTh
c6f6ed48a4 a running color mandelbrot 2022-12-27 01:29:04 +01:00
3 changed files with 32 additions and 37 deletions

View File

@ -2,6 +2,7 @@
julia
pickover
lorentz
mkmandel
voxelize
evolvopick
henon

View File

@ -17,7 +17,7 @@ fraktals.o: fraktals.f90 Makefile
gfortran $(GFOPT) -c $<
OBJDEP = mods/points3d.o mods/xperiment.o fraktals.o mods/fractcolmap.o
OBJS = $(OBJDEP) ../Modules/spitpgm.o
OBJS = $(OBJDEP) ../Modules/pixrgb.o ../Modules/spitpgm.o
# ---------------------------------------------

View File

@ -1,17 +1,17 @@
!-----------------------------------------------------
! IMAGE PROCESSING
!-----------------------------------------------------
!-----------------------------------------------------
subroutine plotsomething(pic, start, cz)
!-
subroutine plotsomething(pic, start)
! use cmplxmath
! use imagetools
use pixrgb
implicit none
integer, intent(inout), dimension (:,:) :: pic
type(t_pixrgb), intent(inout), dimension (:,:) :: pic
complex, intent(in) :: start
type (CenterMag), intent(in) :: cz
! type (CenterMag), intent(in) :: cz
integer :: ix, iy, width, height
real :: fx, fy, mod2
@ -23,13 +23,12 @@ subroutine plotsomething(pic, start, cz)
width = ubound(pic, 1)
height = ubound(pic, 2)
print *, " pic size ", width, height
! print *, " pic size ", width, height
print *, " start ", start
call print_centermag(cz)
! initialise constants
!
maxiter = 999;
maxiter = 2500;
! enter megaloop
!
@ -59,17 +58,16 @@ subroutine plotsomething(pic, start, cz)
iter = iter + 1
!! print *, "ZA ITER ESCAPE", za, iter, escape
enddo
if (escape) then
pic(ix, iy) = mod(iter, 333)
pic(ix, iy)%r = mod(iter*22, 255)
pic(ix, iy)%b = mod(iter*7, 255)
else
! esoteric computation here
! pic(ix, iy) = mod(8*floor(mod2*11.11), 24)
pic(ix, iy) = mod(iter, 222)
pic(ix, iy)%g = mod(int(mod2 * 555), 200)
! pic(ix, iy)%g = mod(iter, 255)
! pic(ix, iy)%b = mod(iter*11, 255)
endif
!-------------------------------------
end do ! fin boucle sur X
end do
end
@ -79,48 +77,44 @@ end
! this is the main programm
!
program mkmandel
use imagetools
use pixrgb
implicit none
interface
subroutine plotsomething (pic, start, cz)
use imagetools
integer, intent(inout), dimension (:,:) :: pic
subroutine plotsomething (pic, start)
use pixrgb
type(t_pixrgb), intent(inout), dimension (:,:) :: pic
complex, intent(in) :: start
type (CenterMag), intent(in) :: cz
end subroutine plotsomething
end interface
integer, dimension(512, 512) :: picz
type (CenterMag) :: cm
type(t_pixrgb), allocatable :: pic(:,:)
integer :: angle
real :: radangle, radius
real :: stx, sty
character (len=80) :: filename
cm%cx = 0.0 ; cm%cy = 0.0 ; cm%mag = 3.0
picz = 0 ! clear screen
print *, "-------- making some mandelbrot -------"
do angle = 0, 1800
allocate(pic(800, 600))
do angle = 0, 1200
call rgbpix_set_to_zero(pic)
radangle = float(angle) * 0.017453292522222
radius = float(angle) / 2000.0
write (filename, "(a, i5.5, a)") "img/", angle, ".pnm"
write (filename, "(a, i5.5, a)") "frames/mandel/", angle, ".pnm"
! filename = trim(filename)
print *, "#### passe ", angle, radangle, trim(filename)
stx = radius * sin(radangle*4.0)
sty = radius * cos(radangle*3.0)
call plotsomething (picz, complex(stx, sty), cm)
call spitaspnm (picz, trim(filename))
stx = radius * sin(radangle*3.9)
sty = radius * cos(radangle*3.3)
call plotsomething (pic, complex(stx, sty))
call rgbpix_spit_as_pnm_8 (pic, trim(filename))
print *
enddo
print *, " [DONE]"