Programming Fractals: How-To Guide

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 9K views
Doctoress SD
Messages
30
Reaction score
0
Can someone tell me how to do this?
 
Physics news on Phys.org
Tell us what you know so far. Do you know what an initiator and a generator are, in the context of fractals?
 
berkeman said:
Tell us what you know so far. Do you know what an initiator and a generator are, in the context of fractals?

I only know what a compiler is and don't know how to work it. I am completely new to this but want to get ahead so that when we study this next year I will not fall behind too far.

I am guessing they are as they sound.


SD
 
It won't hurt if you will be a little bit more specific. Do you want to write a program that will draw a fractal? Any fractal, or do you have something selected already?
 
Perhaps a fractal that is already programmed and the software used so that I can read it and see where it comes from. A fractal that when you zoom in on it, it continues going in and in forever. Any fractal. I would like to know how to write a program that will zoom in on a fractal wherever you click it and it will zoom as long as you click it.
I have never programmed before and this is completely new to me.
 
The math and the program code to generate a fractal are both simple.
The graphics part eats your lunch. Why don't you download winfract and play with it?
It's still free.
Then you'll know at least the names of the things you're talking about. Plus, it is a lot of fun to mess with.

winfract link is at the bottom of this page http://www.dwponline.com/fractals/

Here is a simple mandelbrot set generator that uses glut (graphics), if you want to see what the code looks like:
http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/FIRST_EDITION/programs/mandelbrot.c
 
Doctoress SD said:
I have never programmed before and this is completely new to me.

So you are probably aiming too high. Start with something simpler. Write program that'll display Fibonacci numbers or something. Displaying graphic and getting input from mouse will require already some fluency in programming.
 
Ok, how do I do that? The Fibonacci sequence is SOOOOOOOO cool. I just had to say that. Nature is amazing, like wow.