Skip to main content

The Buddhabrot


Ever since I got my first glimpse of computer-generated fractals, I was hooked. The Julia and Mandelbrot sets captured my imagination, and I knew I had to make my own generator. At the time all I felt comfortable programming was a TRS-80 Colour Computer 3, and I had a shaky knowledge of the complex numbers needed to calculate such fractals. My first attempts failed to properly render the Mandelbrot set, since I had not realized the need for an extra step.


When I finally got comfortable with C, I wrote another Mandelbrot generator. You can find it at the bottom of this page. It requires a pre-Mac OS X PowerPC Mac, but has some nifty optimizations I was quite proud of at the time. However, unlike some Mandelbrot generators of the time, the optimizations still just got pixels onto the screen faster, and eschewed any larger-scale optimizations. Other programmers had used techniques such as outlining boxes in the fractal, then filling them in with the colour of the border. This made calculating the fractal itself faster, but had some room for error.


When I discovered that someone had developed a new take on the Mandelbrot set, I got excited. Despite the religious connotations, I find the Buddhabrot quite aesthetically pleasing. It has a sort of ghostly appearance that appeals to my sometimes morbid bent.


How the Buddhabrot differs from the traditional Mandelbrot rendering method is that it tallies counts of how many times an iteration of the basic formula passes through a particular location. When scaled into a 256 grayscale image, the somewhat random looking points begin to take on a Mandelbrot-like image that some have likened to images of Buddha.


With a little work, the Buddhabrot can be extended into 4 dimensions. It creates what the original developer calls a Buddhabrot Hologram, or Buddhagram. You can rotate the image such that it appears to be a 3-dimensional object, and manipulating the 4th dimension allows for some further animation.


Always interested in programming my own fractal generators, I put together a version of a Buddhabrot program myself. It requires Mac OS X (not sure what minimum version, probably 10.4 or 10.5), and there are no optimizations whatsoever in it. The “Hog” control determines how much processor time the generating process will take. The settings drawer allows you to control the various parameters of the process, such as maximum iterations before each starting point’s iterations are cut off. You can also change which plane of the Buddhagram is calculated, and drag the image to other applications.


Have fun with it, I had fun making it. If you’re interested in the source code, just send me an email. If there’s enough demand, I’ll post it up here in an update.

Comments

Popular posts from this blog

Am I Jonesing for the Internet?

I’m feeling a little agitated and jittery today. My internet access is down due to some nasty snow and wind. Are the two related? They might be. I know I’m certainly missing my twitter friends and feeling less in touch with the world. How long is this weather going to hold? I can’t look that up. Sure, I could pull out a radio and listen in, if I had one. I might somewhere, but I’m at the mercy of the broadcaster to decide when to report the weather and how much of it to report. Some argue that internet access should be a basic human right. Does this point of view hold water? I suppose it could be argued that since the internet allows us to draw together into a larger community that it is an essential part of improving the human condition. Its use in political organizing and to connect dissidents in repressive regimes can certainly help make the case for it as a basic human right. Is the jitteriness really from not having the internet? My doctor did just increase my dose of modafi

What Kind of Games?

I started programming when I was young, with the hopes of writing video games. I think a lot of kids start that way. When you like something, or someone, you try to emulate what you’re seeing. But how has that early dream turned out? They tell writers to write what they know. It’s good advice. How can you write about life in the Serengeti without have someone to give you a first hand account or having been there yourself? You can always use your imagination, and that’s all you can really do when writing fantasy or science fiction. It works for writing video games. How can you expect to write a genre you don’t immerse yourself in? These days I spend most of my gaming time playing casual games. I’m busy doing other things, and don’t want to spend long stretches just sitting at the console or computer. Recently I read an article about the kind of video games the most people tend to flock to. Typically they’re games that are relatively simple and involve sorting things in some way. It

An Open Letter to David Hewlett

Dear Mr. Hewlett, I’m writing to you in the hopes that you’ll read this and learn a bit about the great woman who was my mother and a big fan of yours. Helen died recently at the much-too-young age of 59. In April she found out she had pancreatic cancer; less than 5 months later, she passed away. If you don’t read this, that’s okay, I guess, because it’s also a part of my grieving process. I think you’ll be touched by it, but at the same time, it’s helping me deal with the loss. My mother as your fan Every movie you were in, she wanted to see. She didn’t get a chance to before she went. I had wanted to buy her A Dog’s Breakfast for Christmas; I think she would have really liked it. I think Cube would have given her a bit of claustrophobia, but didn’t it do that for everyone? She loved Atlantis. I think your performance was a big part of that. Joe Flanigan and Paul McGillion may also have had something to do with that. The episodes she watched of SG-1 were mostly the ones with