Consider a path made up of equal-length segments that can point at any
angle of the form radians, for
, like spokes on
a wheel. A path is specified by a finite sequence of integers, taken
modulo
. For example, if
, then the sequence
corresponds to the ASCII path
_/\_
. ePiX's fractal
approximation starts with such a ``seed'' then recursively (up to a
specified depth) replaces each segment with a scaled and rotated copy
of the seed. The seed above generates the standard von Koch snowflake
fractal. In code:
const int seed[] = {6, 4, 0, 1, -1, 0}; fractal(P(a,b), P(c,d), depth, seed);The first entry of seed[] (here 6) is the number of ``spokes''