How does it work?
- First, the origin is changed to center of canvas using
translate for easier drawing.
- The main variables are
radius is radius of spiral. The
radius is decreased by very small amount(that is
shrinkage) to form spiral.
Otherwise, it will be circle. But for Inward to Outward spiral,
radius start from zero and it is increased instead.
deg is the degree from origin where the spiral should be drew. It is increased every time the spiral is updated
so that it will go in circle.
- Spiral is updated inside
draw function using