Posts

Showing posts with the label fractals

Fractals and the Filled Julia set

Image
The Filled Julia set is another fractal that can be built with the complex numbers, just like the Mandelbrot set. To build a Filled Julia set, we pick a complex number c and then repeatedly apply f(z) = z^2 + c to every point of the plane. If that iterative application of f produces a sequence that goes to infinity, the point does not belong to the Filled Julia set. If it does not go to infinity, then the point belongs to the Filled Julia set and is coloured black. Using Python and pygame I developed a small script that allows the user to click a point on the complex plane and create its Filled Julia set. The code, which is very simple, can be found here . A Windows executable can be downloaded from here . Pressing the left arrow shows the previous Filled Julia sets you created, while the right arrow takes you to the more recent ones. Pressing the spacebar erases the current fractal and shows the initial black axis. [Pt] O 'Filled Julia set' é outro fractal que pode ser def...

Fractals and the Mandelbrot set

Image
I have always liked the concept of fractal. They are very beautiful, they have a notion of infinity embedded in it, and they make no sense (seriously though, self-similarity ?). How couldn't they be loved? Despite being fond of fractals, I had never understood them because I didn't know how to mathematically define one. I knew how to draw some, for example the snowflake or the Sierpinski triangle , but drawing and mathematical definitions aren't quite the same thing. Enlightenment struck after watching this video from Numberphile about the Mandelbrot set, the fractal I presented above. After all, a fractal like this was not but a simple formula and a check for a bound on a sequence! I recommend all of you to watch that video. Simplifying it a lot, for each number you can create a sequence. After you do that, you check if the numbers in that sequence explode or remain small. After learning how to create the Mandelbrot set I put that knowledge to practice, making use of my ...