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

Living with Bipolar Disorder

Feeling down when something bad happens is normal. Feeling elated when something good happens is great. Bipolar disorder is neither. Previously referred to as manic depressive disorder, bipolar disorder consists of mood episodes ranging from deep, dark depression to the sense of invincibility and superiority that is characteristic of a manic phase. It disrupts the lives of those who suffer from it and all those around them. Luckily, however, with the right course of treatment it can be kept under control. Bipolar disorder has been found to be linked genetically and physiologically to schizophrenia. A person suffering from bipolar disorder can experience the same sort of hallucinations and delusions as someone with schizophrenia. Both have a genetic component, with a number of genes interacting to create a pre-disposition to these disorders. The families of those afflicted often include others with one of these disorders, mood disorders or alcoholism. Depression is a common symptom ...

Losing a loved one, as an atheist

When I was around 11 or 12, I started to question the received wisdom that there was a deity. I came to the conclusion that all signs pointed to no. Do I outright, unequivocally and without reservation deny the existence of such an entity? No. However, I don’t see it as a likely scenario, and until I’m presented with hard evidence, I have enough reason to say that there isn’t. Some people take comfort in their religious beliefs, especially their belief in an afterlife. I have no interest in an afterlife, either for myself of my loved ones. In the past five years I’ve lost both my grandmother and mother, both of whom I loved dearly. No amount of belief in an afterlife would soothe my pain. I mourn at the fact that they are lost from my life, right here, right now. I imagine it’s the same even for those who believe that the dead pass on to somewhere else. You can’t escape the fact that their tangible presence is forever gone from your life. Unless you believe in ghosts, but that’s a ...

If I Grow Up

I’ve figured out what I want to be if I grow up: a writer. In fact, by writing this I’m living the dream, aren’t I? I guess things have been building up to this my whole life; I’ve been reading since I could, and writing even when I didn’t have to. Whatever my mood has been, as long as it wasn’t too severe, I’ve always written. When I was down, I wrote depressing poetry or prose. When I was up, I wrote whatever popped into my head. Now that I’m stable, I can take the time to write coherent, sensible articles. What are you going to write? It’s a good question, and I like it quite a bit. I’m going to write articles here, like the ones I’ve written so far. I’m going to write for HandmadeNews.org , with my first article there out just recently. I’ll always be writing emails. Sometimes I’ll write things down in my notebooks. If I feel like my writing is worthy of it, I might write a screenplay Josh Olson would enjoy reading. I wont bring it to him to read, though. If it’s good enough ...