Complex Shapes

Complex numbers are used for calculating fractals, space filling curves and Appollonian Gaskets. You can select one of the shape categories, and one example from that category.

These shapes are computed recursively, and you can specify the number of levels of recursion for each, using the More/Fewer or Max/Min buttons

You can opt to view the first few complex numbers of elements drawn (in polar form) or their end positions (in Cartesian form).

More explainaton is available by selecting Concept or Maths for more on the underlying maths. The Animate feature shows the shape being calculated : the speed is adjustable.

Fractals can be 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.

Lines have a length and are at an angle, and when replaced the new line 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 multipled.

Initiators and Generators are complex numbers defining each line's end relative to its start. Lines are drawn from the current position to that plus the new line, being the new position.
'Simple' fractals are formed this way. Specials can require the replacement angle to be negated (using the complex conjugate) or the order of the generator to be reversed.

The Sierpinski, Hilbert, Moore and Peano space filling curves comprise one or more shapes. Such shapes comprise lines interspersed with such shapes. At the top level, the raw shape (or shapes) are drawn. When replacements occur the other shapes are also drawn, usinh recursion.

These shapes are defined by lines with given lengths at given angles - being represented by polar complex numbers. The start position is set (as a Cartesian complex number) and each line is drawn from the current position to that position plus the line in the shape, which becomes the next position.

Apollonian Gaskets start with three circles which touch each other (are mutually tangential). Two other circles can be found which are mutually tangential, so these are drawn. Then groups of three such circles can be used to calculate more circles.

Each circle is defined by its origin (which is represented by a complex number) and its curvature, being 1/radius. The curvature of the new circles are found by solving a quadratic equation of curvatures. The new origin is found solving a similar equation where each value is the product of the origin and curvature of the circle.

See On Complex Numbers for relevant concepts.

Basic Fractal Special Fractal Space Fill Apollonian

Basic Koch SnowFlake TriFlake Forest
Minkowski M on Square McWhorter McW on Pentagon
Hexagon

Dragon Sierpinski Triangle Flowsnake FS Hex

Sierpinski Hilbert Moore Peano

Equal 1-2-3 2-2-3 1-2-2 5-8-8
25-25-28 10-15-19 2-3-6 2-3-6 Nested

Levels    

Show One 4 Separate 4 Overlaid

Explain Concept Maths

List None Initiator and Generator

        Bounding Box