This was too easy. Copied the pseudocode from this page on Wikipedia onto the timeline of an AS3 FLA in Flash CS3, massaged it a bit, wrapped stuff in functions and added some data types, and came up with this:
[kml_flashembed movie=”http://www.bit-101.com/blog/wp-content/uploads/2008/01/mandelbrot.swf” width=”520″ height=”400″/]
I’d say it was less than 30 minutes before I had the old familiar shape on screen. Then another hour and a half to finish, almost all of which was spent on the coloring. Click anywhere to zoom in by 2X on that point. Press any key to reset. Don’t go too crazy clicking around. It takes a couple of seconds to render. Wait for it before clicking again.
I remember playing around with this stuff back in the 80s. I know we consider Flash slow still, but I would have killed for something that rendered this fast back then. 🙂
For anyone interested in generating fractals you should check out http://www.ultrafractal.com – some amazing work in the showcase.
after about thirty (patient) zooms it maxed out and started zooming on the actual pixels instead of the mandelbrot set. any idea why?
noah, what’s happening is the range of numbers you are dealing with at that level of zoom is too small to differentiate in a 32 bit number. You just can’t divide it into that many slices after a while.
Remember my post about “Random generation of the Sierpinski Triangle” – Now it’s my turn to say, “crap, I was working on the same thing.”
I’ll go ahead and finish my Mandelbrot generator. It has a few twists that I think you’ll like.
At this rate we’re going to show up at a conference wearing the same bazaar T-shirt that we thought for sure no one else would own. 🙂
Yeah? Well my Mandelbrot program is going to kick your Mandelbrot program’s ASS!
Wow. I think that’s the geekiest thing I’ve said in my entire life. 🙂
@kp, LOL. Leave it to polyGeek to bring out the geekiest thing you’ve ever said. 🙂
What the Flash community really needs is you and I in a battle to one-up the other with their Mandelbrot generator. The ball is in my court. I’ll try to get mine out the door in the next few weeks.
Well, mine probably won’t really go out until … oh, let’s say April 20-22 … somewhere around there… 🙂
wondering if you ever posted the src to this anywhere, I just coded this for fun today off the same wikipedia entry but I’m having some issues coloring it, curious how you did that
Hi Keith!
I know this is an old post, but I thought I’d leave a comment here anyway because I recently made my own Mandelbrot-Julia set plotter. I think it has some nice features so if you’re interested please have a look:
Flash Mandelbrot-Julia Set Plotter
Yo Keith,
Well you’re smarter than me since I used the same pseudo-code and came up with diddly squat 🙂 Having said that I havent seen complex numbers since I was 19 🙂
Not quite nothing, but my iteration algorithm which decides the colour seems to always escape at 1 iteration, making the drawing rather boring. There is some action in the top left corner however.
I think its a question of centering, maybe mapping the available screen space to virtual coordinates for the iteration equation? ie. map 500 pixels to -1>x>1 ?
Can you help or point me in the right direction? Thanks in advance.
So I created this last year. http://robertwoodbury.com/flash/mandelbrot-shaded.swf
have A look… the double accuracy version runs slower and it has the same 32 bit limit on zooming in, but the colors are changeable and you can switch from julia to mandel and create a zooming box.
This is probably the fastest web generator I know of. Quite simple to use and it navigates both Mandelbrot & Julia.
http://www.ladimolnar.com/Fractalia/