IFS File Format

IFS files are text files using the same format as for the program Fractint. They have the extension ".ifs". Here is an example of a file with the code describing four iterated function systems.
Heighway {; Heighway Dragon                                                     
; Edgar, "Measure, Topology, and Fractal Geometry"                    
; Page 19                                                             
   0.5 -0.5  0.5  0.5  0  0  0.5 
  -0.5 -0.5  0.5 -0.5  1  0  0.5 
}

Fern {; Barnsley's Black Spleenwort fern                                                                      
   0     0     0     0.16  0  0     .01 
   0.85  0.04 -0.04  0.85  0  1.6   .85 
   0.2  -0.26  0.23  0.22  0  1.6   .07 
  -0.15  0.28  0.26  0.24  0  0.44  .07 
}

Levy {; The Levy Dragon                                                                     
   0.5, -0.5,  0.5,  0.5,  0,  0 
   0.5,  0.5, -0.5,  0.5,  0.5,  0.5 
}

Sierpinski Triangle {                                                                      
   0.5  0  0  0.5  0  0   
   0.5  0  0  0.5  0.5  0   
   0.5  0  0  0.5  0.25  0.433   
}

The first line contains the name of the fractal followed by an opening bracket {. Anything after a semi-colon is treated as a comment and ignored as part of the code (although comments can be displayed from within IFS Construction Kit.) There can be up to 20 lines of comments, each of length less than 90 characters.

Following the comments (if any) are lines representing each affine transformations in the IFS. There should be 6 or 7 numbers on each line. The first four are the entries of the matrix. The next two are the entries of the translation vector. If there is a 7th number on the line, it will represent a probability. The numbers in each line should be separated by spaces, tabs, or commas. There can be at most 100 transformations in each IFS.

A closing bracket } on its own line will indicate the end of the IFS definition.

A file should contain at most 30 different iterated function systems.