Polyspiral

A polyspiral is a spiral made of multiple line segments, whereby each segment is larger (or smaller) than the previous one by a given amount. Each segment also changes direction at a given angle.

If you see the effect, you'd think that there's a lot of code involved, but it's actually a very simple loop. In pseudo code, from the Rosetta Code task I created, a few years back:

set incr to 0.0 // animation loop WHILE true incr = (incr + 0.05) MOD 360 x = width / 2 y = height / 2 length = 5 angle = incr // spiral loop FOR 1 TO 150 drawline change direction by angle length = length + 3 angle = (angle + incr) MOD 360 ENDFOR

It takes a while to get up to speed, but it's quite spectacular.

View code on Github