# Angles in the spiral of Theodorus

The previous post looked at how to plot the spiral of Theodorus shown below.

We stopped the construction where we did because the next triangle to be added would overlap the first triangle, which would clutter the image. But we could certainly have kept going.

If we do keep going, then the set of hypotenuse angles will be dense in the circle, with no repeats.

The nth triangle has sides of length 1 and √n, and so the tangent of nth triangle’s acute angle is 1/√n. The angle formed by the nth hypotenuse is thus

arctan(1) + arctan(1/√2) + arctan(1/√3) + … + arctan(1/√n).

Here’s a plot of the first 99 hypotenuse angles.

Here’s the code that produced the plot.

from numpy import *
import matplotlib.pyplot as plt

plt.axes().set_aspect(1)

N = 100
theta = cumsum(arctan(arange(1,N)**-0.5))
plt.scatter(sin(theta), cos(theta))
plt.savefig("theodorus_angles.svg")

If we change N to 500 we get a solid ring because the angles are closer together than the default thickness of dots in a scatterplot.