Title: Rendering the Mandelbrot set Post by: JohnC on March 22, 2008, 06:42:24 PM Hi,
I've written a simple FORTRAN program to render the Mandelbrot set into a 640*480 24 bit colour windows bitmap file. I've tried a few ways of rendering it: 1. using the number of iterations until the distance away is greater than 2 2. using the distance away from the original point or the origin 3. using a 16*16 grid of points within each pixel, iterating 20 times and if 'z' is greater than 2 it's in the set, and the colour of the pixel is the number of those 256 points that are 'in' the set. They have given me the following outputs, and I'm reasonably happy with them, but how do you get it to display the curls that everyone elses programs show? (http://johncant.co.uk/images/mbs1.bmp) (http://johncant.co.uk/images/mbs2.bmp) (http://johncant.co.uk/images/mbs3.bmp) (http://johncant.co.uk/images/mbs4.bmp) (http://johncant.co.uk/images/mbs5.bmp) (http://johncant.co.uk/images/mbs6.bmp) (http://johncant.co.uk/images/mbs7.bmp) Title: Re: Rendering the Mandelbrot set Post by: lycium on March 22, 2008, 06:56:09 PM hmm your iteration might not be correct? using a variation of method 1 (with the escape iteration number indexing a palette) something like this should pop out: http://lyc.deviantart.com/art/fast-accurate-mandelbrot-74088382
Title: Re: Rendering the Mandelbrot set Post by: JohnC on March 23, 2008, 08:59:49 PM Cheers lycium! I made a rookie mistake somewhere in my program. It now displays the full beauty of the M-set!
Here are some pics! (http://www.johncant.co.uk/images/mbsA1.bmp) (http://www.johncant.co.uk/images/mbsA2.bmp) (http://www.johncant.co.uk/images/mbsA3.bmp) (http://www.johncant.co.uk/images/mbsA4.bmp) I now feel like purging those pollutions of the fractal from my website and from this topic. Instead I'll probably replace them with tiny ones! Title: Re: Rendering the Mandelbrot set Post by: cKleinhuis on March 23, 2008, 09:14:02 PM great you found it, i was trying to reproduce that error with ultrafractal, but didnt manage :D got other weird results,
;D but that reminds me of an error i made long ago, i do not now anymore what it caused, but i think it was (real*real+imag*imag) instead of (real*real-imag*imag) for the real part multiplication O0 but look what stared out of the screen ( warning, picture is >8 years old ! ... so i do not have any idea how to reproduce it... :angel1:) (http://www.fractalforums.com/gallery/0/63_13_03_08_11_22_22_3.jpg) Title: Re: Rendering the Mandelbrot set Post by: JohnC on March 27, 2008, 06:59:04 PM This was the sequence resulting from my stupid error: (real part) (real part) (imaginary part) Z(n+1) = Z(n)*Z(n)-Z(n)*Z(n) (real eqn) THEN (imaginary part) (real part) Z(n+1) = 2*Z(n) * Z(n+1) (im eqn) If you zoom in a tiny bit it seems to exhibit some fractal behaviour, but it stops after a short while. |