Home Page
Archive > Updates > 2008
Search:

Updated:12/26/08
v0.15: Binary | Source

I added animation when zooming in and out. This is achieved by drawing the new fractal level into a buffer, and then resizing and translating both fractal level buffers appropriately over a fixed number of frames to animate a zoom effect. It would, of course, be optimal to redraw the entire fractal on each frame of the animation, but this would be a MAJOR speed hit.

The visual quality doesn’t look as good as I’d like at the moment due to XP’s StretchBlt API not using very good resizing algorithms, but it will do for now. Basically, colors show up too brightly when being resized. I can just plug in another resizing algorithm later that will give better results, possibly using a GPU API (DirectX or OpenGL) for optimal results and speed.

I also cleaned up the comments a little.


Time spent on update: 2.5 hours
Download Content
Updated:12/20/08

So I was required to read up on Mandelbrot Fractals for something this last Tuesday, and was really intrigued by the concept, so I threw this project [v0.1 binary, source] together in 2 hours that night ^_^.

I spent 40 minutes on the program outline and the fractal calculations, 20 minutes on the zooming and panning, and an hour on the coloring. The coloring part is really hard because there are no solid formulas I could find out there for them. It will possibly take a lot of experimenting and playing with algorithms and tweaking numbers if I can’t find a good algorithm for it online. The coloring is actually not technically part of the escape-time fractals (see the picture under “Formal Definition” here), only the solid black part is, and the rest can be white. However, it’s the coloring taken from a result of the algorithm that really makes the most pretty patterns in the fractal, so it’s a very important part.


The current project only shows the Mandelbrot Fractal. Future versions will allow providing parameters dynamically to view any Julia Fractal. [Added in v0.50]

Other planned updates:
  • Better coloring!!!: As previously stated, I need to spend a lot of time on coloring calculations :-\. [Added in v0.50]
  • Animated zooming: When zooming in or out on an area, the screen will animate the zoom [Added in v0.15]
  • Optimization: Speed optimization with intelligent escape (detail) level calculations
  • Select zoom area via a dragged box: While clicking will still be supported to zoom in on an area, the user will also be able to drag the mouse to create a selectable box area to zoom in on
  • View zoom level information: A dialog box and better visual GUI that allows you to see and change your current zoom level, window coordinate scales, and other information [Added in v0.50]
  • Coordinate information: Add to the GUI viewable information about each coordinate (pixel) you are mousing over including time to escape, color, and other information [Added in v0.50]
  • Non-XP dependency: Make a Linux port :-)
  • Infinite Zoom: Double precision floating point calculations under-run at the 24th zoom level :-(.

This project is too much in its infancy for a higher rating. It will be sure to go up as I work on it and add more features.


Current controls:
  • Left click (mouse down, actually): Zoom in by 200% around the point clicked
  • Right click (mouse down, actually): Zoom out by 200%
  • =: Double the current detail level (This is needed whenever you see scattered lone black pixels in an area)
  • -: Halve the current detail level (If things are going too slow, this helps out a lot)
  • w/a/s/d: Pan the screen 1/16th in the direction up/left/down/right

... It just took me an hour longer to write this post and all the documentation than it did to write the program XD. Darn documentation!


Download Content