Fractal Mathematics
I really want to find out about fractal mathematics, does anyone know what the best resources would be? on or offline (books etc).
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
MojoWorlds is a fantastic fractal terrain generator. The product is not free, but if you can afford $200 its a great tool for experimenting with programmable fractals (and in the process generating unbelievable renderings of fractal planets).
www.pandromeda.com
Also check out the 300 pages of Doc Musgrave''s PhD dissertation. He''s one of the head guys over at Pandromeda. He worked with Mandelbrot!
http://www.wizardnet.com/musgrave/dissertation.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
www.pandromeda.com
Also check out the 300 pages of Doc Musgrave''s PhD dissertation. He''s one of the head guys over at Pandromeda. He worked with Mandelbrot!
http://www.wizardnet.com/musgrave/dissertation.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
quote:
Original post by krez
here, this oughta keep you busy learning for a while![]()
Good idea to use a search engine. BUT Xgkkp asked for our advice on the "best resources." Google can't necessarily tell him that "these here are the best sites." Please read the post more carefully before sending a hasty and impatient reply,

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Edited by - grhodes_at_work on February 14, 2002 2:30:28 PM
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
OK, I made a fractal program not so long ago, this I''ll try and explain how to make a simple mandelbrot fractal, if that can be of any help 
Im assuming you have some basic knowledge of complex numbers. I defined a class "Complex" that I use here, if you have any questions about that, just ask.
The fractal lies in the so-called complex plane (similar to the x, y plane) And each point is a recusion equation (if thats a new expression, dont worry, ill explain)
In the code I go through each point and check if the recursion equation converge or diverge (more difficult terms hehe; to converge means that it goes towards a spesific value, to diverge means that it goes towards infinity)
Ok I just wrote that out of my head so I might have some dumb mistakes in it, let me know if there is something.
Oh.. and note that you dont have to save the values as color values, you can also make a height map (like I did here)
My post up, your post down, my site here

Im assuming you have some basic knowledge of complex numbers. I defined a class "Complex" that I use here, if you have any questions about that, just ask.
The fractal lies in the so-called complex plane (similar to the x, y plane) And each point is a recusion equation (if thats a new expression, dont worry, ill explain)
In the code I go through each point and check if the recursion equation converge or diverge (more difficult terms hehe; to converge means that it goes towards a spesific value, to diverge means that it goes towards infinity)
|
Ok I just wrote that out of my head so I might have some dumb mistakes in it, let me know if there is something.
Oh.. and note that you dont have to save the values as color values, you can also make a height map (like I did here)
quote:
Original post by Jesper T
Oh.. and note that you dont have to save the values as color values, you can also make a height map (like I did here)
Cool stuff that!
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
yeah, Google seemed only to give results of links to programs that show fractals, or school sites.
Thanks for the code. Ill go through it tomorrow ( its 00:15 ) and try to understand it, but looking at it briefly, where you have used "Z", did you mean "Zone" because I cannot see where it is declared. also, could you explain the complex data type?
Thanks for the code. Ill go through it tomorrow ( its 00:15 ) and try to understand it, but looking at it briefly, where you have used "Z", did you mean "Zone" because I cannot see where it is declared. also, could you explain the complex data type?
"Z" is the standard variable name that represents complex numbers in textbooks. Jesper T probably meant to use either Zone or "Z" everywhere. Perhaps he choose Z because it is commonly used.
The complex data type is just a complex (aka "imaginary") number. It has a real and imaginary part. Very confusing terminology. Really, its like a vector. The "x" component is defined to be the "real" component, and the "y" component is defined to be the "imaginary" component. In the mathematics of complex numbers, the imaginary component sort of represents a frequency, as in either a time frequency (e.g, frequency of a sound vibration) or a space frequency (e.g., the frequency of the wave of a water ripple). The real component represents a parameter that varies with rate (rate of acceleration or deceleration for example, or the rate at which the water ripple settles to zero leaving only still water).
I know that''s confusing. Its just definitions. Complex math and the complex variable type are just tools for solving a set of equations. Look at the reference material on fractals (especially mandelbrot set) and think of complex numbers in terms of what they present.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
The complex data type is just a complex (aka "imaginary") number. It has a real and imaginary part. Very confusing terminology. Really, its like a vector. The "x" component is defined to be the "real" component, and the "y" component is defined to be the "imaginary" component. In the mathematics of complex numbers, the imaginary component sort of represents a frequency, as in either a time frequency (e.g, frequency of a sound vibration) or a space frequency (e.g., the frequency of the wave of a water ripple). The real component represents a parameter that varies with rate (rate of acceleration or deceleration for example, or the rate at which the water ripple settles to zero leaving only still water).
I know that''s confusing. Its just definitions. Complex math and the complex variable type are just tools for solving a set of equations. Look at the reference material on fractals (especially mandelbrot set) and think of complex numbers in terms of what they present.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Yes, what grhodes said.
And I can add some calculation rules:
'i' is usually used to denote the imaginary number, where:
i*i = -1
thus:
sqrt(-1) = i and -i
(-i, since (-i)^2 = (-1*i)^2 = (-1)^2 * (i)^2 = 1 * -1 = -1)
and:
(3i)*(3i) = (3*3)*(i*i) = 9 * -1 = -9
thus:
sqrt(-9) = sqrt(-1*9) = sqrt(-1)*sqrt(9) = 3i and -3i
As grhodes said the complex number consist of a imaginary part and a real part:
Z = a + b*i, or on 'x,y coordinate' form: Z=(a, b)
(here a is a real number, and b is its frequency (since its multiplyed with i)
To add two complex numbers:
Z = a+b*i, P = c+d*i, into the complex result X = x + y*i
Z + P = (a+ b*i)+(c + d*i) = a+c + (b+d)*i =>
x = a+c, and y = b+d
To multiply two complex numbers:
Z = a+b*i, P = c+d*i, into the complex result X = x + y*i
Z * P = (a+ b*i)+(c + d*i) = a*c + a*d*i + b*i*c + b*i*d*i = a*c + b*d*i*i + (a*d + b*c)*i = a*c - b*d + (a*d + b*c)*i =>
x = a*c - b*d
y = a*d + b*c
Thats basically all you need for the mandelbrot fractal.
Here is how I defined the Complex data type:
Note that I have made the square root function only return one value to make it simpler even though that is not entirewly correct (it should return 2 values)
(edit) I think that there exists one standard c++ complex data type too (which probably is a lot faster than mine)
My post up, your post down, my site here
Edited by - Jesper T on February 15, 2002 1:39:07 AM
And I can add some calculation rules:
'i' is usually used to denote the imaginary number, where:
i*i = -1
thus:
sqrt(-1) = i and -i
(-i, since (-i)^2 = (-1*i)^2 = (-1)^2 * (i)^2 = 1 * -1 = -1)
and:
(3i)*(3i) = (3*3)*(i*i) = 9 * -1 = -9
thus:
sqrt(-9) = sqrt(-1*9) = sqrt(-1)*sqrt(9) = 3i and -3i
As grhodes said the complex number consist of a imaginary part and a real part:
Z = a + b*i, or on 'x,y coordinate' form: Z=(a, b)
(here a is a real number, and b is its frequency (since its multiplyed with i)
To add two complex numbers:
Z = a+b*i, P = c+d*i, into the complex result X = x + y*i
Z + P = (a+ b*i)+(c + d*i) = a+c + (b+d)*i =>
x = a+c, and y = b+d
To multiply two complex numbers:
Z = a+b*i, P = c+d*i, into the complex result X = x + y*i
Z * P = (a+ b*i)+(c + d*i) = a*c + a*d*i + b*i*c + b*i*d*i = a*c + b*d*i*i + (a*d + b*c)*i = a*c - b*d + (a*d + b*c)*i =>
x = a*c - b*d
y = a*d + b*c
Thats basically all you need for the mandelbrot fractal.
Here is how I defined the Complex data type:
|
Note that I have made the square root function only return one value to make it simpler even though that is not entirewly correct (it should return 2 values)
(edit) I think that there exists one standard c++ complex data type too (which probably is a lot faster than mine)
Edited by - Jesper T on February 15, 2002 1:39:07 AM
whenever i leave this line in
if comment out that line and the references to it, it works fine ( i assume, i can see no output).
Thanks alot so far anyway though.
Edit: If i move the declaration of result outside of the function, it works, does anyone know why? Also, I now have a nice looking mandelbrot fractal. Presumably it can be removed to give results like the nice pics you see on the internet.
also, i put the range down to a very small value (i have modified add to accept different x any y values) and it isn't drawing much. how can i get it to calculate in higer detail in smaller intervals, like the demos you see that can zoom down n branches.
Edited by - Xgkkp on February 15, 2002 2:15:59 PM
|
if comment out that line and the references to it, it works fine ( i assume, i can see no output).
Thanks alot so far anyway though.
Edit: If i move the declaration of result outside of the function, it works, does anyone know why? Also, I now have a nice looking mandelbrot fractal. Presumably it can be removed to give results like the nice pics you see on the internet.
also, i put the range down to a very small value (i have modified add to accept different x any y values) and it isn't drawing much. how can i get it to calculate in higer detail in smaller intervals, like the demos you see that can zoom down n branches.
Edited by - Xgkkp on February 15, 2002 2:15:59 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement