To draw a Mandelbrot Set, we can cheat just a bit-it's hard to draw imaginary numbers on a computer screen. But how does this translate into the pretty picture above? So the Mandelbrot Set is the set of all complex numbers which stay bounded, however many iterations we apply. If \(z\) stays "bounded" below this upper limit, we can say that our coordinate \(c\) is in the Mandelbrot set. In practice, what this means is that no matter how many times we go through the square-and-add process above, the number \(z\) will always stay below some maximum upper limit. The Wikipedia definition mentions this iteration diverging. This simple "square-and-add" process is all you need to know to calculate Mandelbrot numbers! Then, to find the next number in the sequence, we multiply \(z\) by itself, and then add \(c\) to the result. In other words, we start with our complex number to test (\(c\)) and another complex number \(z = 0\). The specific operation we're going to be applying is this: If we keep applying these operations, we'll end up with a series of complex numbers. These operations might be adding, subtracting, multiplying by another number-generally all the things we're familiar with doing to regular numbers, only this time they have two components. I'll have a go at breaking it down.įor any complex number, we can apply some operations to it and get a new complex number. That's not too understandable, and it's doing that thing where it uses "i.e." to introduce another, even more confusing way of explaining something. For a complex number like \(2 + 3i\) to be in the Mandelbrot set, it has to meet one criterion. So the Mandelbrot Set consists of complex numbers. This is the simplest imaginary number, and is used to build up complex numbers like we've seen above. If you're wondering what the \(i\) means, that's simple: \(i\) is defined as the square root of negative one, \(\sqrt\). To write these numbers out, we can use this notation: \(a + bi\) This corresponds to a complex number with \(a\) as its real component and \(b\) as its imaginary component. These numbers are complex numbers: they have two components, a real part and an imaginary part. The Mandelbrot Set, as you might have guessed, is a set of numbers. I'm the sort of person who scares easily with complicated formulae, so I'll keep it as simple as possible. Stay with me-there'll be a little bit of maths, but none of it is too hard. But before diving into the C, here's a quick introduction to the Mandelbrot set, and how it's calculated. The code is in C, and after all my tweaks only comes to 128 lines of code. It started out as a simple image renderer, but soon blossomed into a full-scale video zoom renderer: Recently I've been working on a project I've called Brot, after the Mandelbrot set.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |