Page 1 of 1
Programming (Fortran).
Posted: Sat Jun 14, 2008 9:49 pm
by _JonasS
Can anyone help me out here? I would like to make a fractal that I can zoom in on and continue zooming in till my hearts content and zoom in where I choose to zoom. I know very little about progrmming other than playing about with some compilers which I couldn't work out because I don't know the languages. I will be using Fortran, C and Python.
Thanks
Posted: Sat Jun 14, 2008 9:55 pm
by _Scottie
You might want to look at a concept called Recursion. This is generally how fractals are created.
Recursion is where you call yourself x number of times until a certain criteria is met. The parameters are placed on the stack each time you call it, so you need to be careful that you don't call it so many times that you get a stack overflow error.
Posted: Sat Jun 14, 2008 11:03 pm
by _asbestosman
A start is here:
http://www4.informatik.uni-erlangen.de/ ... de105.html
To zoom, you'll need to look up the right API to detect mouse input and then translate that into coordinates.
The key in the above program will be to change the following statements:
Code: Select all
FORALL (i=1:n, j=1:n)
zr(i,j) = REAL(i-1)/REAL(n-1)
zi(i,j) = REAL(j-1)/REAL(n-1)
END FORALL
You will need to change how zr and zi are computed by changing REAL(i-1)/REAL(n-1) to something more appropriate.
Posted: Sun Jun 15, 2008 8:16 pm
by _Yoda
Scottie wrote:You might want to look at a concept called Recursion. This is generally how fractals are created.
Recursion is where you call yourself x number of times until a certain criteria is met. The parameters are placed on the stack each time you call it, so you need to be careful that you don't call it so many times that you get a stack overflow error.
There you go again...talking all computery. You do it just to tease me, don't you?
;)
Posted: Wed Jun 25, 2008 7:33 pm
by _bcspace
Wow. I haven't seen FORTRAN in 20+ years. Ever try the military's ADA? That was back in the days when one could buy a real computin' machine; a full blown 386 processor with built-in math coprocessor and LIM support.
Of course before that, there was my TIMEX Sinclair 1K RAM 1K ROM 4.77 mhz speed demon complete with cassette tape drive and 32K memory addons. Zilog still makes the Z80 processor but it's much different now.
Posted: Wed Jun 25, 2008 8:57 pm
by _Scottie
bcspace wrote:Wow. I haven't seen FORTRAN in 20+ years. Ever try the military's ADA? That was back in the days when one could buy a real computin' machine; a full blown 386 processor with built-in math coprocessor and LIM support.
Of course before that, there was my TIMEX Sinclair 1K RAM 1K ROM 4.77 mhz speed demon complete with cassette tape drive and 32K memory addons. Zilog still makes the Z80 processor but it's much different now.
Yeah, the Timex Sinclair was my first home computer! My friend had the 4k memory add on. I was sooo jealous of him.
Until I got my Ti 99/4a with 16k!! Then the Commodore 64.