Hi guys! I am trying to make a mandelbrot code in fortran and I am having some problems
I have just started and I'd like to know what is wrong until now.
Thank you in advance
links that can help us
PROGRAM MANDELBROT
IMPLICIT NONE
REAL :: C_REAL, C_IMAG, Z_REAL, Z_IMAG, Z_REAL2, Z_IMAG_2
INTEGER I, ABOUT_OPEN
CHARACTER(LEN=80) :: FILE_OUT
INTEGER, PARAMETER :: OKAY = 0, UNIT_OUT = 17, MAX_INTERATIONS=300
LOGICAL :: BELONG
WRITE(FILE_OUT, 17)
17 FORMAT(i3,"MANDEL_CORDINATES")
OPEN(UNIT = UNIT_OUT, FILE = FILE_OUT, &
&STATUS="new", ACTION="write", IOSTAT=ABOUT_OPEN)
IF(ABOUT_OPEN == ok)THEN
BELONG = .TRUE.
DO I=1,N
C_REAL ! I do not know how start C_REAL
C_IMAG ! AND C_IMAG
END DO
Z_REAL=C_REAL
Z_IMAG=CI
Z_REAL2=ZR*ZR
Z_IMAG2=Z_IMAG*Z_IMAG
DO I=0, MAX_INTERATIONS
IF ((ZRS + ZIS) <= 4.0)THEN
Z_REAL2 = Z_REAL * Z_REAL
Z_IMAG2 = Z_IMAG * Z_IMAG
Z_IMAG = 2.0 * Z_REAL * Z_IMAG + C_IMAG
Z_REAL = Z_REAL2 - Z_IMAG2 + C_REAL
END IF
WRITE(UNIT=UNIT_OUT, FMT=*)Z_REAL, Z_IMAG
END DO
END IF
CLOSE(unit=UNIT_OUT)
END PROGRAM MANDELBROT
I have just started and I'd like to know what is wrong until now.
Thank you in advance
links that can help us
PROGRAM MANDELBROT
IMPLICIT NONE
REAL :: C_REAL, C_IMAG, Z_REAL, Z_IMAG, Z_REAL2, Z_IMAG_2
INTEGER I, ABOUT_OPEN
CHARACTER(LEN=80) :: FILE_OUT
INTEGER, PARAMETER :: OKAY = 0, UNIT_OUT = 17, MAX_INTERATIONS=300
LOGICAL :: BELONG
WRITE(FILE_OUT, 17)
17 FORMAT(i3,"MANDEL_CORDINATES")
OPEN(UNIT = UNIT_OUT, FILE = FILE_OUT, &
&STATUS="new", ACTION="write", IOSTAT=ABOUT_OPEN)
IF(ABOUT_OPEN == ok)THEN
BELONG = .TRUE.
DO I=1,N
C_REAL ! I do not know how start C_REAL
C_IMAG ! AND C_IMAG
END DO
Z_REAL=C_REAL
Z_IMAG=CI
Z_REAL2=ZR*ZR
Z_IMAG2=Z_IMAG*Z_IMAG
DO I=0, MAX_INTERATIONS
IF ((ZRS + ZIS) <= 4.0)THEN
Z_REAL2 = Z_REAL * Z_REAL
Z_IMAG2 = Z_IMAG * Z_IMAG
Z_IMAG = 2.0 * Z_REAL * Z_IMAG + C_IMAG
Z_REAL = Z_REAL2 - Z_IMAG2 + C_REAL
END IF
WRITE(UNIT=UNIT_OUT, FMT=*)Z_REAL, Z_IMAG
END DO
END IF
CLOSE(unit=UNIT_OUT)
END PROGRAM MANDELBROT