The Very Best Fractal & Mathematical Pictures

This gallery showcases some of our best fractal & mathematical pictures. Start here! We have Mandelbrot & Julia Sets, Lorenz attractors, The Burning Ship, Flame fractals, Harmonographs, Buddhabrots, Menger Sponges, Sierpinskis, 3D Fractals, Fractal Zooms, Lyapunov Fracatals, etc. Oh, and …

Spectral Harmonographs

This Python + Pygame program draws the trace of 4 decaying sine waves, 2 per axis, with rainbow colours. It generates a sequence of random harmonographs.

A harmonograph is a mechanical device typically seen in science museums, that has two …

Stars and Stripes

A variation on the Stars and Stripes American Flag for Independence Day. It’s an exercise in the use of transparency in Pygame. The stripes are made transparent so the stars image behind shows through.…

A Fake Circle made of Straight Lines

Inspired by this post on Reddit, I wrote this little script to do the same thing. The circle is an illusion created by 100 straight-line tangents to an invisible circle. The tangents are created by drawing a chord in a …

Tweetable Python Code Golf

Code Golf is the amusement of writing as short as possible a program to perform a given task. So for example, if the task is to compute the average of a list of numbers (which could be changed at any …

Fast Mandelbrot Set by QuadTree

Most Mandelbrot Set programs proceed along the display area, pixel by pixel horizontally, row by row from top to bottom. This one doesn’t. It divides up the screen into 6 horizontal squares in 2 rows, then for each one, checks …

Extensible Harmonograph

Often seen in science museums, the harmonograph is a device that combines wave motions (e.g. from some pendulums) to move a pen resting on a sheet of paper. These movements result in attractive patterns. This device can be simulated easily …

Easy Graph Plotting with Pyplot

Graphs (also known as charts) are an indispensible visual aid for conveying a lot of data in an easy-to-digest form. Everyone is familiar with graphs in everyday life, such as those showing trends over time, e.g. world population, global …

Random Walk

A colourful random walk. The basic idea is very simple: choose a random heading in the range 0:360 degrees. Step in that direction. Choose another random heading & step again. Do this 2,000 times. As a bonus, we go through …

Turtle Star

A very simple Turtle program. Turtle can draw intricate shapes using programs that repeat simple moves.

Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig …

Sierpinski Triangle, drawn by a Turtle

This is a classic fractal drawn with a recursion algorithm and Turtle graphics. The Sierpinski Triangle’s sides are bisected and the triangle they form is removed. The procedure is then applied to the 3 remaining triangles, and to them recursively …

Square Spiral

This is a very simple introduction to Turtle graphics. The turtle starts in the middle of the window, moves forward a small distance, turns right, moves forward a slightly longer distance, right again, even further this time… until the distance …

Naive Mandelbrot Set

This is your basic Mandelbrot Set plotter. Very little effort made to speed it up, except for plotting top & bottom pixels together as they’re mirrored across the x-axis. Later I’ll show you some much faster programs!

The heart of …

Fractal Tree

This program draws a ‘tree’ by drawing a trunk (initially; later it’s a branch) and appending a tree, recursively. Uses Pillow.…

Black & White Harmonographs

Black & White Harmonographs. Because colour gets boring after a while…

Harmonographs are those devices often seen in science museums, that consist of a pen connected to a number of pendulums, suspended over a sheet of paper on a board, …

Fractal Python Programs

These fractals were generated by Python programs from the Active State website. They often make use of recursion.

Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel …

Orbits of The Starship Mandelbrot, in 3D

Orbits of The Starship Mandelbrot, in 3D.

In fractal mathematics, an orbit is the sequence of points in the complex plane traced out by the iteration of the function that generates the fractal. In the case of the Mandelbrot Set, …