Angle Path Generator
This generator draws a sequence of lines based on a simple mathematical rule.
In the initial step, a unit length line is drawn starting from the origin, in the positive X-axis direction.
At each step n ∈ {1, ..., N}, if the angle mode is "relative", previous heading direction is
rotated by c × f(n) degrees. On the other hand, if the angle mode is "absolute", the orientation
is directly set to the value c × f(n) degrees.
By this simple rule, interesting patterns appear for different choice of c and f(n).
Most of the UI elements — such as line width, number of steps and coloring of blocks of steps —
are computed dynamically and their value are optimized for the function f(n) = n² in relative angle mode.
Constant representation
Constant c can be any real number, but for specifically integer returning f(n) functions,
rational multiples of 2π as radians (will be converted to degreen in the code) can provide symmetric results.
For this representation, user can select 2 integers r, s, where the constant is calculated as 2π×r/s in radians.
On the other hand, if f(n) returns decimal numbers, it make sense to have decimal c and animate this value continiously to see the affect of changing constant dynamically.
Auto N
For the n² function, checking Auto N calculates the precise step sequence required to perfectly close a rotational rosette.
There is a mathematical formula to calculate the minimal such N which is available in the code of this page.
End of Documentation