Quote Originally Posted by Adak View Post
Follow the "right hand rule":

1. Start by going right, as far as you can. Put a unique "have been there" value, into each square of the array, you have visited.

2. When you can no longer move into a new square in the current direction, loop back to #1.
I like this but I wouldn't use a "have been there" value as I don't think it's necessary (although it will work and isn't "bad"). You can easily calculate the path length for 1 entire "rotation/spiral" (re-calculate each "rotation".) The total path length is known as well, so you know when to stop pirouetting.