I wrote a few days ago about how I had this killer (simple but useful) Mac application idea bouncing around in my head for a year now. I have to confess I’ve spent a fair amount of time over the last three days in refreshing my Cocoa programming skills, and I’ve written my first decent test-app: a Mandelbrot generator.
Back when I was a teenager I was fascinated with the Mandelbrot set. It was kind of the “hallmark image” of the then-newly-emerging field of fractal geometry. This was the same field of Mathematics that was allowing computer-generated landscapes like moon in the Genesis Planet Demonstration video from Star Trek: Wrath of Kahn. I remember staring at the strangely beguiling image in a Scientific American article, fascinated with its strange features. Also incredible was the fact that no matter how closely you “zoomed-in” to a point of the Mandelbrot set, you got a uniquely different-yet-similar picture.
I remember being about 16 years old and reading and re-reading the article, trying to understand the relatively simple mathematics behind it. It was just the equation z=z2+c but in the complex number plane. I understood complex numbers and had a year or two of algebra under my belt, but couldn’t get it. Then one day I had that “eureka” moment and it all made sense. I jotted down the simple quadratic, translated it into a computer algorithm and set to writing a program to test it.
Continue reading “Learning OS X Cocoa Programming: MandleTry”