2
$\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$
  • $\begingroup$ Which all points are given? I think we need more info. $\endgroup$ – samjoe Nov 13 '17 at 17:49
  • $\begingroup$ The point in the middle is give zc and the angle of tilt with respect to x-axis 'r' is given. We can assume zc to be at origin if that makes it easier. Please see the attached picture. And the length and breadth of all the sides are known too. $\endgroup$ – John Joe Nov 13 '17 at 17:52
2
$\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$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.