April 2012
15 posts
This will be an attempt at describing the algorithmic procedure used to generate some of the graphics posted here.
- Start with a line segment of any length L.
- Now pick any angle A in the range 0° to 180°.
- Connect another line segment of the same length as the first at the end of the first line so that two create an angle of A between them.
- Repeat this procedure connecting additional lines of length L at the same angle A to the endpoints of the previous lines.
This shows the procedure repeated several times using an angle of about 20°.

And this shows the pattern that results some 150 lines into the procedure with the same angle of 20°:

Instead, if each additional line segment were to be made slightly smaller than the previous, say 99% of the length of the previous line, then the lines would look something like this where they begin to spiral in towards the center:

Its interesting to observe how these patterns change as the value for the angle A is varied. The closer the values for two different angles are the closer the two patterns will resemble one another. However, for each distinct angle A the resulting pattern is unique.
Here are some animations that show the angle vary through some range while keeping the number of lines in the iteration fixed. Note how relatively small the range is that the angle varies through.
With all lines the same length varying through angles of about 10.7° to 10.4° :

and with each line 99% the length of the previous with an angle variation from 20° to 16° :

This algorithm can be equivalently thought of as taking a certain ordered sequence of points in the plane and then joining them with straight lines—playing connect the dots basically. Different arrangements and sequences of points in the plane would produce different patterns when connected with lines.
Perhaps the most elegant and concise way to mathematically describe this algorithm is by making use of the complex numbers. Due to the way complex numbers multiply, this algorithm can be specified by picking a complex number z and then successively multiplying it by itself to get a sequence of points given by zn, where the resulting complex numbers zn represent the nth point in the sequence. Then the connect the dots routine is performed with this sequence of points.
For instance, the configuration for the first 100 dots corresponding to a particular choice of complex number may look something like this:
![]()
Then once all the dots are connected with lines it would look like this:
![]()
Performing this procedure with each different point in the complex plane generates a different pattern.
This kind of procedure where a certain transformation is repeated on some elements is considered an iterated function system, which is a class of fractals.
You could imagine all the different possibilities which would result from using different functions.
In fact, all of these images here were generated using similar procedures.
Download an interactive CDF file here where you can control the parameters, view the graphics, and also create numbered dot sequences.
![]()
![]()
![]()
![]()
animated GIFs in high-res (700x700)
Mathematica code:
Table[
ListAnimate[
Table[
Graphics[
{White, Line[
Table[
{-.99^n*Sin[n*a], .99^n*Cos[n*a]},
{n, 0, 700}]]},
PlotRange -> 1, ImageSize -> 700, Background -> Black],
{a, 2 Pi/p, 2 Pi/(p + 1), (2 Pi/(p + 1) - 2 Pi/p)/75}]],
{p, 3, 6, 1}]