Num2D Shapes

This shows the generation of different shapes, including fractals using Num2D, variables which can be in cartesian (x,y) form or polar (size angle) form.

Shapes are defined by a series of num2D defined in Polar form - these represent the end of each line relative to its start. The polar form is convenient for calculating shapes and for drawing them scaled or rotated. However, when drawing them, the Cartesian equivalent is needed, as draw from current position to that plus that defined by the line.

The user can select one of three geometric shapes, and these are transformed before being drawn : size 0.8^n angle 30*n, where n is 'operations'.

The user can select one of various fractals, which 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. The lines generated can then be replaced. This continues for many levels of replacement - until the set maximum level is reached. These are made from polar numbers, so a replaced line is the Polar product of the original line and that from the generator.

The Basic, Koch, Snowflake and Forest fractals are generated in this way. The Dragon and Sierpinski triangles require the replacement angle to be negated alternately - the conjugate of the generator number being used. For the dragon, this starts with the second, whereas for the triangle, each level toggles whether the first or second line's angle is negated.

The Sierpinksi space filling curve can also be drawn : its lines are generated in polar form. Different levels can be selected.

The user use the More/Fewer operations to set the level of replacement before lines are drawn / scaling of shapes.

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

Shapes  Triangle Square Pentagon Robot

Fractal  Basic Koch SnowFlake Forest

Advanced  Dragon Sierpinski Triangle

Space Filling  Sierpinski Curve

Operations:  

View:  

List: None Lines Positions