Through this project, we wanted to implement a visual representation of the Mandelbrot Set and how fast values outside of the Mandelbrot set diverge. The Mandelbrot set is a fractal demonstrating whether a complex number a + bi converges when applied as c to the function fc(z) = z2 + c for initial condition z = 0, and recursively plugging in the returned value to fc(z). If at any time the result is greater than 2, the series is guaranteed to not converge. When the complex number converges, it is a member of the Mandelbrot set and, when represented on a 2D plane with real and imaginary axis, is generally colored black. When the complex number does not converge, the rate at which the function diverges is represented by the shading of the coordinate.
We found a simple implementation of the Mandelbrot Set that draws the set, but doesn’t allow for the user to move around the set beyond zooming in on (0,0), so we decided to enhance this implementation by allowing the user to move within the set and allow for natural scrolling instead of their implementation, which took the user’s clicks and drags of the mouse as zoom functionality. We also wanted to reduce the discrete bands of color that appear in the image as well as allow the user to change the colors used in the set. We were able to change the code to accept dragging the mouse as a way to navigate around the set, and zooming into the set at the given coordinates using the keyboard.
When beginning the project, the largest impediment we faced was that the code easily compiled on a Mac, but after hours of attempting to install and include the necessary libraries, the program would refuse to compile on both Linux and Windows. With this impediment, we were forced to pair program on one computer. We later found that the limitations of the precision of floats limits the ability of OpenGL to zoom past a certain point, whereat the image becomes pixelated.


















Additional images, a video demo, and an executable can be found HERE (Google Drive link).
Team Members: Katie Manderfeld, Adam Barsness
Our ultimate goal is to achieve something like the image below (Source: Simpsons contributor at Wikipedia) with OpenGL where a user can "zoom in" to the Mandelbrot set:
Similar implementations of what we'd like to do are hosted on various sites, two written in JavaScript are particularly interesting: here (just JavaScript) and here (JavaScript and HTML5). Statically generating fractals (just images) are visually pleasing on their own, but it's more interesting if users can interact with the fractals. Ideally a user will be able to zoom with the mousewheel/track pad as if they were scrolling up or down.
It was possible to find, and more importantly run, an OpenGL implementation in the public domain that renders the Mandelbrot fractal and lets the user zoom in and out centered at (0,0). However, the user can't change where they are zooming, it stays at the center of the image, so the effect of this zoom is fairly limited. To zoom, a user needs to click and hold, and then drag either the mousewheel or trackpad to zoom in or out. This action is fairly cumbersome, and the zooming motion itself is fairly disjointed.
We would also like to increase the quality of the image that is produced, "bands" of color are visible (similar to quantization in image processing), and we'd like to make the transitions between colors more smooth.
It took a while to get to this point because while there are a lot of implementation that exist that simply draw the Mandelbrot set, the code is often not documented well and it was difficult to find something that we could compile and run successfully.


