The Computational Beauty of Nature
Source code

mrcm

generate fractals with the MRCM algorithm

mrcm -help
  or
mrcm   [-infile string] [-width integer] [-height integer]
       [-depth integer]  [-border  integer]  [-bw  double]
       [-bh double] [-L] [-term string] [-inv] [-mag inte-
       ger]

Uses the Multiple Reduction Copy Machine algorithm to generate affine fractals. Accepts an arbitrary number of transformations. Good for making snowflakes and mosaic patterns.

An affine fractal is computed via the Multiple Reduction Copy Machine Algorithm. 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
-depthDepth of recursive calls.5
-borderNumber of pixels in border.10
-bwWidth of the seed box.1.0
-bhHeight of the seed box.1.0
-LDraw an 'L' in each box?False
-termHow to plot points.None
-invInvert colors?False
-magMagnification factor.1

mrcm.c on GitHub