Turning a spiral into coordinates Lets say I have a spiral like so
8 1-2
| | |
7 0 3
|   |
6-5-4

Which continues to go on to infinity round and round.
In terms of co-ords:
0 at (0, 0),
1 at (0, 1),
2 at (1, 1),
3 at (1, 0),
4 at (1, -1),
5 at (0, -1),
6 at (-1, -1),
7 at (-1, 0),
8 at (-1, 1)

etc...
Another way of looking at it is that the spiral goes up 1, right 1, down 2, left 2, up 3, right 3, down 4, left 4, etc...
So the question is, given a number n, which represents a place in the spiral, how would I get the co-ords of that place on the spiral?
 A: The solution to your problem is fairly straightforward in complex variables. I hope that you're familiar with that because anything else would be ghastly. In fact, in Cartesian coordinates it would be more of a problem of accounting than mathematics.
The first step in identifying the location of the $n^{th}$ point is to have an equation for the entire spiral. Let's begin with the idea that you have sequence of numbers, in your case $S=\{0,1,1,2,2,3,3,4,4,5,...\}$ and that a each point there's a $-90^{\circ}$ (clockwise) turn. Now, we can build up the spiral by the method of linkages, so-called because of it similarity to the old-fashioned surveyor chain, made up of articulated segments of unit length. Thus,
$$\begin{align}
& z_0=0\\
& z_1=-1e^{-i\pi/2}\\
& z_2=-1e^{-i\pi/2}-1e^{-i2\pi/2}\\
& z_3=-1e^{-i\pi/2}-1e^{-i2\pi/2}-2e^{-i3\pi/2}\\
& z_4=-1e^{-i\pi/2}-1e^{-i2\pi/2}-2e^{-i3\pi/2}-2e^{-i4\pi/2}\\
& z_5=-1e^{-i\pi/2}-1e^{-i2\pi/2}-2e^{-i3\pi/2}-2e^{-i4\pi/2}-3e^{-i5\pi/2}\\
\end{align}$$
and so on.
So now the exact solution for the position of the $n^{th}$ point is given by
$$z_n=-\sum_{k=0}^nS(k)e^{-ik\pi/2}$$
For you information, the minus signs are due to the fact that your spiral evolves clockwise, rather than the conventional anticlockwise. And if you wanted the complete collection of points, say for plotting, the you would use the cumulative sum rather than the sum. (It's aggravating that there is no mathematical symbol for the cumulative sum or product.)
