The Computational Beauty of Nature
Source code

ifs

generate fractals with an IFS

Full screen →

ifs -help
  or
ifs    [-infile string] [-width integer] [-height integer]
       [-border integer] [-its  integer]  [-skip  integer]
       [-term string] [-inv] [-mag integer]

Similar to mrcm but uses Iterated Functional Systems for finer granularity.

An affine fractal is computed via an Iterated Functional System. The rules must be supplied from a file with each line consisting of six values (A-F) such that the values of A-D describe a 2x2 matrix (A, B; C, D), while E and F describes a 2x1 column vector (E; F).

Miscellany

There is a shell script called 'ifscma' supplied with the source code that has a simple interface that allows you to reference sets of predefined rules by name. You may also wish to see the author's book, "The Computational Beauty of Nature," for some more examples.

Bugs

No sanity checks are performed to make sure that any of the options make sense.

The maximum number of affine rules is determined by the constant MAXRULES, which you may need to adjust under exceptional circumstances.

Options

-infileData input file.-
-widthWidth of the plot in pixels.640
-heightHeight of the plot in pixels.480
-borderNumber of pixels in border.10
-itsNumber of iterations.1000
-skipNumber of iteration to skip.50
-termHow to plot points.None
-invInvert colors?False
-magMagnification factor.1

ifs.c on GitHub