Complex numbers used for fractals and space filling curves.
Fractals are defined by an Initiator (one or more lines) and a Generator (many lines). Each line in the Initiator is replaced by the lines in the Generator, which can then be replaced. This continues until the set maximum replacements is reached.
The user can select the Fractal type and use the More/Fewer options to set the level of replacement before lines are drawn.
Each line has a length and is at an angle, and when replaced by one in the Generator, its length is the product of the lengths of both lines, its angle is the sum of the angles of both lines.
This happens when two complex numbers are multiplied, so both Initiators and Generators are represented by complex numbers. These define each line's end relative to its start, so a line is drawn from the current position to that plus the new line, which becomes the new position.
You can opt to view the first few complex numbers of lines drawn (in polar form) or their end positions (in Cartesian form).
The 'Simple' fractals are generated in this way. Dragon and Sierpinski Triangle require the replacement angle to be negated alternately - using the conjugate of the generator number. Flowsnake sometimes reverses the generator. FSHex draws hexagons instead of lines for flowsnake.
The Sierpinski, Hilbert, Moore and Peano space filling curves also have with polar complex numbers lines between points.
See On Complex Numbers for relevant concepts.
Simple Basic Koch SnowFlake Forest Hex
Special Dragon Sierpinski Triangle Flowsnake FS Hex
Space Filling Sierpinski Hilbert Moore Peano
Replacements
Show One 4 Separate 4 Overlaid Concept
List None Initiator and Generator
Lines Positions Bounding Box