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
Programming (Fortran).
-
- _Emeritus
- Posts: 494
- Joined: Mon May 05, 2008 1:24 pm
Programming (Fortran).
"HOW DARE YOU KEEP US WAITING!!!!! I demand you post right this very instant or I'll... I'll... I'll hold my breath until I slump over and bang my head against the keyboard resulting in me posting something along the lines of "SR Wphgohbrfg76hou7wbn.xdf87e4iubnaelghe45auhnea4iunh eb9uih t4e9h eibn z"! "-- Angus McAwesome (Jul 21/08 11:51 pm)
-
- _Emeritus
- Posts: 4166
- Joined: Thu Aug 09, 2007 9:54 pm
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.
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.
If there's one thing I've learned from this board, it's that consensual sex with multiple partners is okay unless God commands it. - Abman
I find this place to be hostile toward all brands of stupidity. That's why I like it. - Some Schmo
I find this place to be hostile toward all brands of stupidity. That's why I like it. - Some Schmo
-
- _Emeritus
- Posts: 6215
- Joined: Tue Nov 07, 2006 10:32 pm
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:
You will need to change how zr and zi are computed by changing REAL(i-1)/REAL(n-1) to something more appropriate.
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.
That's General Leo. He could be my friend if he weren't my enemy.
eritis sicut dii
I support NCMO
eritis sicut dii
I support NCMO
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?
;)
-
- _Emeritus
- Posts: 18534
- Joined: Mon Dec 04, 2006 6:48 pm
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.
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.
Machina Sublime
Satan's Plan Deconstructed.
Your Best Resource On Joseph Smith's Polygamy.
Conservatism is the Gospel of Christ and the Plan of Salvation in Action.
The Degeneracy Of Progressivism.
Satan's Plan Deconstructed.
Your Best Resource On Joseph Smith's Polygamy.
Conservatism is the Gospel of Christ and the Plan of Salvation in Action.
The Degeneracy Of Progressivism.
-
- _Emeritus
- Posts: 4166
- Joined: Thu Aug 09, 2007 9:54 pm
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.
If there's one thing I've learned from this board, it's that consensual sex with multiple partners is okay unless God commands it. - Abman
I find this place to be hostile toward all brands of stupidity. That's why I like it. - Some Schmo
I find this place to be hostile toward all brands of stupidity. That's why I like it. - Some Schmo