[Math] Finding two vertices of a rectangle given two vertices and angle

coordinate systemsgeometry

I have a rectangle where I know the coordinates of the opposite diagonal corners.
I also know the angle that the rectangle is rotated.
I would like to solve to find the coordinates of the other two vertices or opposite corners.

To help illustrate I am posting a diagram I found on here.

Basically I would like to find point C and D. And I know that the rectangle ABCD is rotated to the left by 23 degrees.

Diagram

How can I solve for C and D?

Best Answer

There are a couple of different approaches.

If you're comfortable using matrices to perform rotations of points in a plane, take the rotation matrix $$A = \begin{pmatrix} \cos\theta &\sin\theta \\ -\sin\theta& \cos\theta \end{pmatrix}$$ where $\theta$ is equivalent to $23$ degrees, and apply it to the coordinates of $A$ and $B$. This is a $23$-degree rotation to the right, making the images of the four points into a rectangle aligned with the axes. You can then easily find the coordinates of the images of $C$ and $D$, and invert the rotation (apply the matrix $A^T$) to find the points $C$ and $D$.

Without using transformations, you know that the slope of line $AD$ is $\tan \theta$ (where $\theta$ is equivalent to $23$ degrees) and the slope of the line $BD$ is $-\frac{1}{\tan\theta}$. You can derive equations for the lines $AD$ and $BD$ from these facts and the coordinates of $A$ and $B$. Solve these equations simultaneously and you have the coordinates of $D$. A similar procedure finds the coordinates of $C$.

Related Question