Calculate new point of line when changing the angle

268 Views Asked by At

I got 3 Points which form an angle alpha. How do i calculate the new location of Point3 when the alpha is changed? Point1 and Point2 stay staionary.

enter image description here

1

There are 1 best solutions below

0
On

If point 2 is the origin, and the angle changes by an amount $\theta$, effectively you are rotating the endpoint around the origin in a counterclockwise direction by an angle $\theta$. If $(x,y)$ are the coordinates of the original point, then the new point has coordinates \begin{equation*} \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{pmatrix} \begin{bmatrix} x \\ y\end{bmatrix} \end{equation*} If point 2 is not the origin, the simplest thing to do is to subtract its coordinates from $(x,y)$, perform this transformation, and add its coordinates back in.