How to find the vertices angle after rotation

Solution 1:

When a point $(x,y)$ is rotated about the origin $(0,0)$ counterclockwise by an angle $\theta$, the coordinates of the new point $(x',y')$ are $$\begin{align} x'&=x\cos(\theta)-y\sin(\theta), \\ y'&=x\sin(\theta)+y\cos(\theta).\end{align}$$ Thus, when we rotate a point $(x,y)$ about another point $(p,q)$ counterclockwise by an angle $\theta$, we can compute the new point's coordinates by

  1. translating the entire plane so that $(p,q)$ goes to the origin,
  2. perform the rotation, and then
  3. translate the entire plane back.

To translate $(p,q)$ to the origin, we subtract $p$ from $x$-coordinates and $q$ from $y$-coordinates, and to undo the operation we add instead of subtract. Thus, for example, after translating $(p,q)$ to the origin, the coordinates $(x,y)$ of our point have become $(x-p,y-q)$.

Therefore, the new point's coordinates are $$\begin{align} x'&=(x-p)\cos(\theta)-(y-q)\sin(\theta)+p, \\ y'&=(x-p)\sin(\theta)+(y-q)\cos(\theta)+q.\end{align}$$ In your particular case, we can now see that the coordinates of the points $a$, $b$, $c$, and $d$ after rotation are $$\begin{align} a'&=((1-3)\cos(15)-(5-3)\sin(15)+3,(1-3)\sin(15)+(5-3)\cos(15)+3)\\\\ &=\left((-2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)-(2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)+3,(-2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)-(2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)+3\right)\\\\ &=(3-\sqrt{6},3+\sqrt{2})\\\\ &\approx(0.55051,4.41421)\\\\\\ b'&=((5-3)\cos(15)-(5-3)\sin(15)+3,(5-3)\sin(15)+(5-3)\cos(15)+3)\\\\ &=\left((2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)-(2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)+3,(2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)-(2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)+3\right)\\\\ &=(3+\sqrt{2},3+\sqrt{6})\\\\ &\approx(4.41421,5.44949)\\\\\\ c'&=((1-3)\cos(15)-(1-3)\sin(15)+3,(1-3)\sin(15)+(1-3)\cos(15)+3)\\\\ &=\left((-2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)-(-2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)+3,(-2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)-(-2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)+3\right)\\\\ &=(3-\sqrt{2},3-\sqrt{6})\\\\ &\approx(1.58579,0.55051)\\\\\\ d'&=((5-3)\cos(15)-(1-3)\sin(15)+3,(5-3)\sin(15)+(1-3)\cos(15)+3)\\\\ &=\left((2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)-(-2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)+3,(2)\left(\tfrac{-1+\sqrt{3}}{2\sqrt{2}}\right)-(-2)\left(\tfrac{1+\sqrt{3}}{2\sqrt{2}}\right)+3\right)\\\\ &=(3+\sqrt{6},3-\sqrt{2})\\\\ &\approx(5.44949,1.58579)\\\\\\ \end{align}$$


Plotting these points in Mathematica demonstrates visually that our calculations were correct:

ListPlot[{{3 - Sqrt[6], 3 + Sqrt[2]}, {3 + Sqrt[2], 3 + Sqrt[6]}, 
{3 - Sqrt[2], 3 - Sqrt[6]}, {3 + Sqrt[6], 3 - Sqrt[2]}}, AspectRatio -> 1, 
AxesOrigin -> {0, 0}, PlotMarkers -> {Automatic, Medium}, PlotStyle -> Blue]

enter image description here

Solution 2:

I think you can move the origin to the point of center of the square first and then use a proper rotation matrix to find your new coordinates. In fact if the center of the square has coordinates $(x_0,y_0)$ in LHS picture, by shifting $(0,0)\to(x_0,y_0)$, every points in LHS picture with(X,Y) has $(X-x_0,Y-y_0)$ coordinates in RHS picture. Now use the proper rotation matrix noting that $\theta=15$. See http://en.wikipedia.org/wiki/Rotation_matrix