How to find vertices of a rectangle when center coordinates and angle of tilt is given?

$\begingroup$

Need to find z1, z2 z3 and z4 when zc and r are given.

Been trying to solve this seemingly simple geometry problem. Can't wrap my head around it. It's a rectangle with center coordinates given and the angle of tilt. We also have the length of each sides (2L and 2B). We need to find the vertices.

$\endgroup$ 2

2 Answers

$\begingroup$

Illustration

If $\gamma = 0$, vector $\vec{u} = ( w, 0 )$ and vector $\vec{v} = ( 0, b )$.

Rotating a 2D vector $(x , y)$ counterclockwise yields $$\begin{cases} x^, = x \cos\gamma - y \sin\gamma \\ y^, = x \sin\gamma + y \cos\gamma \end{cases} \tag{1}\label{na1}$$ therefore $$\vec{u} = ( w \cos\gamma ,\, w \sin\gamma ) \tag{2}\label{na2}$$ and $$\vec{v} = ( -b \sin\gamma ,\, b \cos\gamma ) \tag{3}\label{na3}$$

If we know $\gamma$, $w$, $b$, and $\vec{z_c}$, then the four vertices of the rotated rectangle are $$\begin{cases} \vec{z_1} = \vec{z_c} - \vec{u} + \vec{v} \\ \vec{z_2} = \vec{z_c} + \vec{u} + \vec{v} \\ \vec{z_3} = \vec{z_c} + \vec{u} - \vec{v} \\ \vec{z_4} = \vec{z_c} - \vec{u} - \vec{v} \end{cases} \tag{4}\label{na4}$$ or equivalently, $$\begin{cases} x_1 = x_c - w \cos\gamma - b \sin\gamma \\ x_2 = x_c + w \cos\gamma - b \sin\gamma \\ x_3 = x_c + w \cos\gamma + b \sin\gamma \\ x_4 = x_c - w \cos\gamma + b \sin\gamma \end{cases}, \qquad \begin{cases} y_1 = y_c - w \sin\gamma + b \cos\gamma \\ y_2 = y_c + w \sin\gamma + b \cos\gamma \\ y_3 = y_c + w \sin\gamma - b \cos\gamma \\ y_4 = y_c - w \sin\gamma - b \cos\gamma \end{cases} \tag{5}\label{na5}$$

$\endgroup$ 0 $\begingroup$

Hint:

Consider the coordinate system with $z_c=(0,0)$:

enter image description here

$\endgroup$ 0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like