You all know the Barnsley Fern and The Sierpinski Triangle.

I tried to find something similar (to the Sierpinski Triangle) in the disk but all I got was this ring:

algorithm in the circle

What would be some other algorithms that produce some fractal-like structure?

EDIT: The way I generated this picture is the following:

I start from some point of the disk (I guess it doesn't matter where you start, I started from the boundary) and then check what angles you can move if you move the lenght of the radius of the disk to still stay inside the disk. At first I chose an angle from these possible ones at random and that way I seemed to fill the whole disk. Then I narrowed the range for the possible angles (for example $[\pi - \alpha, \pi + \alpha] \to [\pi - \frac{\alpha}{2}, \pi + \frac{\alpha}{2} ]$, where $\alpha > 0$) down and the formation seemed to move towards an annulus. When you narrow the choise of the angle to a single angle ($x + q(y-x)$, when the interval is $[x,y]$, $q \in (0,1)$), it collapses to this ring. I guess this is because this ring is fixed by the algorithm so when you land on it, you stay on it.

I see now my question was perhaps little bit too broad. I think the algorithms I'm most interested in for the moment is these ones where you start from a point and then move along according to some rules like in the Sierpinski triangle generating algorithm. Well there are many ways to generate it, but I think you know what I mean, the one where you move towards the corners.

  • 1
    $\begingroup$ There are many. Can you narrow your focus? How, for example, did you generate your circular image? $\endgroup$ Apr 14, 2015 at 13:00

2 Answers 2


I mean there are literally to many count, but I'll elaborate on my personal favorite.


An L-system is a grammar of sorts, in other words, it takes a collection of inputs and gives new outputs, and the person managing the L-system assigns meaning to the various outputs. To start, you must provide an Axiom, this is the base that the L-system will work from. Second, you must provide rewrite rules. To illustrate,

Axiom: $F$

Rules: $F \rightarrow F+F-F+F$

Now to generate the fractal, you have to take the Axiom run it through the rewrite rules, and then take that output and run it through the rules multiple times. To graph the fractal you give each symbol meaning and use a pointer to draw. For this system, F means draw one unit in a direction, + means turn $\pi/3$ radians up.

Koch Curve L-System

The reason I like L-systems more than the other systems is two fold. Firstly, it allows easier calculation of fractal dimension. Secondly, it has a more naturalistic properties than other fractal generating programs. For instance this was generated with L-systems.

L-system Tree

Now, here's the reason calculating fractal dimension is so easy. Usually we have, $$D={{\ln(N)} \over {\ln(S)}}$$, interpreted as the number of boxes of length $1/S$ that are needed to cover a fractal. However, this definition can be very hard to implement. With L-systems however, the formula can be interpreted in a very easy way. N now means count the number of symbols in a particular iteration output, and S is length of line drawn from the start of the output to the end of the output. There's no need to have crazy box counting programs, and you can easily implement the method in a program. However, more interestingly if you want to, you can count the number of symbols in any iteration with difference equations.


Try the Apollonian Gasket, it's rather interesting, and more or less the same procedure as for the Sierpinski triangle: http://en.m.wikipedia.org/wiki/Apollonian_gasket enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .