This page allows you to download the python script to generate pictures of you own. The script itself is rather complicated so I'm not going to try and explain how it works. Using it, though, is quite simple.
You will need to download the following files and save them in your python path. The first 5 are for calculating the patterns, the last three render them to bitmaps.
The following code snippet shows how to start off a pattern. The layout is taken from the ActiveState Python IDE, see http://www.activestate.com/Products/ActivePython/. I use version 2.3, I've not tested this on more recent versions.
"import Spattern" loads all the modules into the environment.
"pattern=SPattern.SPattern()" creates a pattern object called "pattern". You only need to do the first two statements once per session, you can reuse the pattern object.
"pattern.start (13,1)" initialises the pattern to a 13 sided polygon with radial spokes. (13,0) would create a polygon without the spokes.
"pattern.draw(160,'spokes13')" draws
the pattern to a bitmap called 'spokes13.bmp'. The module "Spattern.py"
contains the statement
def_path = 'c:/python23/work/shapes/'
which identifies where the patterns are saved. To save them somewhere else
you need to edit the file and change this before importing the "Spattern"
module into
the environment. "160" defines the size of the bitmap. The
result looks like this.

To create the next pattern in the sequence use the "nextPattern" function. This replaces the current pattern with the next one in the sequence.
Which looks like this.

Note: You don't have to draw the pattern after every illustration.
If you aren't interested in printing out the intermediate steps you can you use the short-cut
which combines the above operations into a single function call: makePattern. The first parameter is the symettry value, '13'. The second is whether or not we want spokes, '1' is yes. The third parameter is the number of times to apply the nextPattern algorithm. The above sequence will recreate the 'spokes13b' pattern described above.
The "getDual" function can be used to obtain the dual of the current pattern. Note that this creates a new object (called "dual" in this example), the original pattern, called "pattern", still exists.
The dual looks like this.

You can now continue iterating with the dual or the original pattern, for instance
Produces these two images
![]() |
![]() |
We can go mad and take duals again
![]() |
![]() |
or we can start again.

The relaxation algorithm has been used to generate the animations on the animations pages, for instance, on this page, we have the code
The parameters are:
| Visits since April 2005: |