# Thread: Rotating triangle on lattice points

1. ## Rotating triangle on lattice points

Say I have a traingle with vertices (0,0), (240,0), and (240,180). With I want to rotate this triangle about (0,0) so that the coordinates of the vertices remain integers. I want to count the number of such triangles which upon rotation have integer coordinates. What would be the algorithm for this?

2. Hello decor

Welcome to Math Help Forum!
Originally Posted by decor
Say I have a traingle with vertices (0,0), (240,0), and (240,180). With I want to rotate this triangle about (0,0) so that the coordinates of the vertices remain integers. I want to count the number of such triangles which upon rotation have integer coordinates. What would be the algorithm for this?
We have a $\displaystyle 3-4-5$ triangle here, with sides of length $\displaystyle 180, \,240,\, 300$ units.

In its initial position, the vertex $\displaystyle (240,180)$ has coordinates $\displaystyle (300\cos\alpha, 300\sin\alpha)$, where $\displaystyle \tan\alpha = \tfrac34$. If the triangle is rotated through an angle $\displaystyle \theta$ anticlockwise about $\displaystyle (0,0)$, then this vertex will have coordinates $\displaystyle (300\cos(\theta+\alpha), 300\sin(\theta+\alpha))=(240\cos\theta-180\sin\theta,240\sin\theta+180\cos\theta)$.

The vertex initially at $\displaystyle (240,0)$ will now be at $\displaystyle (240\cos\theta, 240\sin\theta)$.

In order for these to be integer coordinates, then, all the following will need to be integers:

• $\displaystyle 240\cos\theta$

• $\displaystyle 240\sin\theta$

• $\displaystyle 180\cos\theta$

• $\displaystyle 180\sin\theta$

Pythagorean Triples would give a general method for solving this type of problem, but with the numbers $\displaystyle 180$ and $\displaystyle 240$, the only possible values are based on $\displaystyle 3-4-5$, since no other triple has a largest number which is a factor of $\displaystyle 180$ and $\displaystyle 240$ (apart, obviously, from derivatives of this triple: $\displaystyle 6-8-10$, etc).

So I reckon that the possible values of $\displaystyle \theta$ are $\displaystyle 0^o, \arctan(\tfrac34), \arctan(\tfrac43), 90^o,...$ etc.

The first of these rotations gives coordinates:

$\displaystyle (240,180)\rightarrow(84,288)$ and $\displaystyle (240,0)\rightarrow(192,144)$

The next gives:

$\displaystyle (240,180)\rightarrow(0,300)$ and $\displaystyle (240,0)\rightarrow(144,192)$

... and so on.