IFS Peano

The images you see to the right were all created with IFS Peano.*

IFS Peano Logo

Click here or click the logo above for a test drive!

What is IFS Peano?

How do you use IFS Peano?

What are .pifs files?

IFS Peano is free software. Download it at Sourceforge!
© 2007 Leon Q. Brin

The full size images were created with IFS Peano. The images were then resized with the GIMP. Click here to learn more about processing IFS Peano images with the GIMP.

Hilbert Curve
Peano-like Curve

What is IFS Peano?

IFS Peano is a program for creating cool graphics like the ones you see above.  Though you don't need to know it in order to use the program, the cool graphics it produces are actually space-filling curves defined by iterated function systems (IFSs).  That's where it gets the "IFS" part of its name.

How do you use IFS Peano?

  1. Basic Usage
    1. The Design Area
    2. Other Features
  2. Tips
    1. Getting Creative
    2. The Hilbert Curve

1. Basic usage

a. The Design Area

When the applet starts up, you should see a square design area. That square is where you will design the template for your space-filling curve. This diagram steps you through a basic construction.

IFS Function Design Area
  • Choose a starting point: The six circles you see are the six possible starting points. Simply click one to move on to the next step. The starting point you select will turn green.
  • Choose an ending point: The green circle is the starting point. One or more other circles will appear. Click on one of these other circles to select an ending point. The template will then be filled in with four primitives connecting the starting point to the ending point.
  • Completion: Complete the construction of the space-filling curve by clicking one of the "Completion" buttons (to the right of the design area).
  • Efficient vs Random: The efficient completion button will always construct the same curve for any given template. The random button will generate a random curve each time it is clicked.

The preview area will show an approximation of the space-filling curve. When you want a further look at what you see in the preview area, click on the "Render Fractal" button. This will bring up a dialog box that allows you to create a larger, more colorful, and more or less detailed version of your space-filling curve. The seeded deterministic method yields the most interesting results. 

Hilbert.pifs was created with the seeded deterministic method using a single color. Peano-like.pifs is a poster (showing 4 consecutive steps of the curve creation) created with the seeded deterministic method using a single color. Random1.pifs was created with the seeded deterministic method using one color per map. Random2.pifs was created using the Random render method. In fact, all space-filling curves rendered using the single color, one color per map, or random render methods will just be squares. This shows that the attractor of the IFS (the space-filling curve) really does fill a square!

b. Other Features

Clicking the "Directed" (or "Undirected") button toggles the design area between primitive shapes with arrow heads (directed) and primitive shapes with no arrow heads (undirected). Directed primitives will produce directed space-filling curves, and undirected primitives will produce undirected space-filling curves.

Clicking the "Previous Phase" button brings you back to the endpoint selection phase of the process.

Clicking the "Primitive" button in the design area will cycle the primitive shape closest to the button. There are 13 directed and 9 undirected primitives.

Clicking the "Transform" button in the design area will cycle the transformation (rotation and reflection) of the primitive shape closest to the button. There are 8 transformations.

2. Tips

a. Getting Creative

The automatically generated templates are nice, but they are not the be-all end-all of template generation. As noted above, when the ending point is selected, a random path from start to end is automatically filled in. You don't have to be content with just this one, though. You can always click the "Previous Phase" button, and then reselect the ending point. This will generate another random template.

You don't have to be content with that, either, though. You can use the "Primitive" and "Transform" buttons to manually create any one of the 518 possible template paths! A valid template meets the following four conditions.

  1. It touches the starting point and the ending point. For a directed template, the arrows must point from the start to the end.
  2. It is a continuous path (doesn't have any breaks).
  3. It has matching creeps between primitives (creeps point in the same direction). The creeps are shown by small arrows near the ends of some of the primitives. An end with no creep must match up with another end with no creep.
  4. If it has creeps at the starting and ending points, those creeps point toward corners of the design area (away from the two lines going through the center of the design area, the axes).
But don't worry about trying to memorize all that! As you build the template, progress messages are shown just below the instructions in the design area. They will let you know if there is anything wrong with your template.

b. The Hilbert Curve

In 1891, David Hilbert wrote a paper describing the first non-intersecting space-filling curve. Hilbert.pifs (above) shows one of the steps of its construction. To recreate the Hilbert Curve, build the template below using the "Primitive" and "Transform" buttons in the design area. Then click the "Efficient Completion" button.

Hilbert Curve template

What are .pifs files?

The .pifsfiles hold all the information about a given template and the Iterated Function System used to create the image in the preview area. There are seven types of lines that will appear in .pifs files.

Phase: Describes which phase of the building process the template is in.
Endpoints: The coordinates of the endpoints of the template.
Level1: Describes the four pieces of the template, and whether the template is directed or not.
Matrix IFS: The size of the Iterated Function System matrix.
IFS: The beginning of a IFS in the IFS Matrix. Note that many of these IFSs will be empty (no AffineMaps between them and the next IFS: line)!
AffineMap: Holds the six parameters (a,b,c,d,e,f) of the affine map


Seed: Describes the starting shape (iteration 0) of the space-filling curve.

This page is hosted by Sourceforge.net Logo