pickover evolutif

This commit is contained in:
tth
2022-03-30 08:42:39 +02:00
parent f89860afe0
commit 756ef965fd
7 changed files with 79 additions and 42 deletions

View File

@@ -27,6 +27,9 @@ subroutine simple_julia(pic, cx, cy, maxiter)
C = complex(cx, cy)
print *, "Const = ", C
! ready ? ok, clear the picture
pic = 0
do ix = 1, width
fx = (float(ix) / (float(width)/4.0) - 2.0)
do iy = 1, height
@@ -50,11 +53,10 @@ subroutine simple_julia(pic, cx, cy, maxiter)
if (over_iter) then
pic(ix, iy) = 0
else
pic(ix, iy) = iter
pic(ix, iy) = iter*12
endif
enddo
enddo
enddo ! iy
enddo ! ix
end subroutine simple_julia
!-----------------------------------------------------
@@ -70,25 +72,19 @@ subroutine compute_pickover(array, coefs)
integer :: i
! print *, "coefs ", coefs
write(0, '(1X, A18, I9)') "compute pickover ", ubound(array, 1)
! write(0, '(1X, A18, I9)') "compute pickover ", ubound(array, 1)
xa = 0.00 ; ya = 0.00 ; za = 0.0
xa = 1.0 ; ya = 1.0 ; za = 1.0
do i=1, ubound(array, 1)
xb = sin(coefs(1)*ya) - za*cos(coefs(2)*xa)
yb = za*sin(coefs(3)*xa) - cos(coefs(4)*ya)
zb = sin(xa)
array(i)%x = xb
array(i)%y = yb
array(i)%z = zb
array(i)%seq = i
xa = xb ; ya = yb ; za = zb
! print *, xb, yb, zb
enddo
end subroutine
@@ -114,6 +110,9 @@ subroutine plot_pickover(pic, count)
STOP " : NO ENOUGH MEMORY"
endif
! Clear the picture
pic = 0
coefs(1) = 2.24 ; coefs(2) = 0.43
coefs(3) = -0.65 ; coefs(4) = -2.43
call compute_pickover(points, coefs)
@@ -122,11 +121,9 @@ subroutine plot_pickover(pic, count)
h = ubound(pic, 2)
do i=1, ubound(points, 1)
px = (points(i)%x * (w/4.09)) + (w / 2)
py = (points(i)%y * (h/4.09)) + (h / 2)
pic(px, py) = 255 ! WARNING COREDUMP
px = int((points(i)%x * (w/4.09)) + (w / 2))
py = int((points(i)%y * (h/4.09)) + (h / 2))
pic(px, py) = 255 ! WARNING COREDUMP ?
enddo
deallocate(points)