Calculating the coordinates of end terminal point of an arc from known r, arc in radyan and starting terminal point coordinates of the arc.

1.2k Views Asked by At

I have searched the site and found similar questions of mine but not exaclty I needed.

enter image description here

I have an arc. I know the coordinates of the arc center (P0), r (radius), coordinates of starting point of the arc (P1) and angle of the arc (between 0 to 360) as shown in attached diagram.

I need to calculate the coordinates end point of the arc P2. How can I do. I have found similar topics and tried to use the methods of them but the results gave me wrong output values.

Thank you in advance.

2

There are 2 best solutions below

2
On BEST ANSWER

Here's an outline of one way to do it:

  1. Calculate the bearing of the vector from $P_0$ to $P_1$ as $\theta = \tan^{-1}[(y_1-y_0)/(x_1-x_0)]$. The angle will be in third quadrant.
  2. Add to this your known angle, $d$. This is the bearing from $P_0$ to $P_2$.
  3. Calculate the $x$ and $y$ coordinates of this new angle on the unit circle by calculating $\cos(\theta + d)$ and $\sin(\theta + d)$, respectively.
  4. Now we need to scale the circle and move its center to $P_0$. Multiply these values by $r$, and add $x_0$ and $y_0$ to the values.

Give that a try.

0
On

I see that you had a minor problem computing the values you wanted using John's outline. I believe that this is due to the fact that for your problem the point with coordinates $(x_1-x_0, y_1-y_0) = (-4.46, -5.946)$ is in the third quadrant, as pointed out by John, so one must be careful in computing the inverse tangent in step 1. Since the range of the inverse tangent is restricted to the interval $(-\pi/2, \pi/2)$, you must add $\pi = 180^\circ$ to the angle found in step 1 to give the correct angle in the third quadrant having the identical value for the tangent, and use this for $\theta$ in step 3. The effect is to change the algebraic sign on the sine and cosine calculated in that step, as you found to be the case.

The coordinates of point $P_2$ can also be calculated from the following formulas: $$\begin{align}x_2 &= x_0 + (x_1 - x_0)\cos{d} - (y_1 - y_0)\sin{d}, \\ y_2 &= y_0 + (x_1 - x_0)\sin{d} + (y_1 - y_0)\cos{d}, \end{align} $$ where $d$ is the angle of arc in your diagram. These can be derived from a knowledge of two-dimensional vector algebra, together with some knowledge of the transformation of the components of a vector under a rotation in the plane. Perhaps these subjects are what you alluded to in a comment as too advanced, and above your math level, but then again they may be ideas that you will be eventually introduced to in your studies or later work. So here is an outline of how these formulas can be derived.

Let $\vec{r}_0 = x_0\,\widehat{i} + y_0\,\widehat{j}$ be the vector from the origin $O$ of some rectangular coordinate system to point $P_0(x_0,y_0)$, let $\vec{r}_1 = x_1\,\widehat{i} + y_1\,\widehat{j}$ be the vector to point $P_1(x_1,y_1)$, and let $\vec{r}_2 = x_2\,\widehat{i} + y_2\,\widehat{j}$ be the vector to point $P_2(x_2,y_2)$. We have the vector identity $\vec{r}_2 = \vec{r}_0 + (\vec{r}_2 - \vec{r}_0)$, where $\vec{r}_2 - \vec{r}_0$ is the displacement vector from $P_0$ to $P_2$. It is convenient to write this identity in matrix notation as $$\begin{bmatrix}x_2 \\ y_2\end{bmatrix} = \begin{bmatrix}x_0 \\ y_0\end{bmatrix} + \begin{bmatrix}x_2 - x_0 \\ y_2 - y_0\end{bmatrix}.$$ The point $P_2$ is the point $P_1$ rotated about an axis through $P_0$ counterclockwise by your angle $d$. The displacement vectors $(\vec{r}_2 - \vec{r}_0)$ and $(\vec{r}_1 - \vec{r}_0)$ thus have the same length (or magnitude), both equal to your radius $r$, that is, you will find that $|\vec{r}_2 - \vec{r}_0| = |\vec{r}_1 - \vec{r}_0| = r$. The components of the two displacement vectors are related under this rotation by $$\begin{bmatrix}x_2 - x_0 \\ y_2 - y_0\end{bmatrix} = \begin{bmatrix}\cos{d} & -\sin{d}\\\sin{d} & \cos{d}\end{bmatrix}\begin{bmatrix}x_1 - x_0 \\ y_1 - y_0\end{bmatrix},$$ or, $$\begin{align}x_2 - x_0 &= (x_1 - x_0)\cos{d} - (y_1 - y_0)\sin{d},\tag{1} \\ y_2 - y_0 &= (x_1 - x_0)\sin{d} + (y_1 - y_0)\cos{d}. \tag{2}\end{align}$$ The components of vector $\vec{r}_2$, the same as the coordinates you are seeking of point $P_2$, are thus $$\begin{align}x_2 &= x_0 + (x_1 - x_0)\cos{d} - (y_1 - y_0)\sin{d}, \\ y_2 &= y_0 + (x_1 - x_0)\sin{d} + (y_1 - y_0)\cos{d}, \end{align} $$ as stated above.

ADDENDUM: For a derivation of the transformation equations under a rotation through the angle $d$, refer to the following Figure illustrating the geometry involved. enter image description here Imagine the coordinate system at arbitrary point $O$, mentioned above, translated to the point $P_0$. In the coordinate system at $P_0$, the rectangular coordinates of $P_2$ with respect to $P_0$ are $x_2-x_0$ and $y_2 - y_0$, which are related to its polar coordinates $(r,\theta_2)$ by $$\begin{align}x_2 -x_0 &= r\cos\theta_2,\\y_2-y_0 &= r\sin{\theta_2}.\end{align}$$ However, we see that $\theta_2 = \theta_1 + d$, so we have, equivalently, $$\begin{align}x_2 -x_0 &= r\cos(\theta_1 + d) = r\,(\cos{\theta_1}\cos{d} - \sin{\theta_1}\sin{d}),\\y_2-y_0 &= r\sin{(\theta_1 + d)} = r\,(\sin{\theta_1}\cos{d} + \cos{\theta_1}\sin{d}),\end{align}$$ using trigonometric identities for the cosine and sine of the sum of two angles. But on the right-hand sides of the last pair of equations, we see that $r\cos{\theta_1} = x_1 - x_0$ and $r\sin{\theta_1} = y_1 - y_0$ are the coordinates of point $P_1$ with respect to $P_0$, which provides the transformation equations (1) and (2) used in the above derivation: $$\begin{align}x_2 - x_0 &= (x_1 - x_0)\cos{d} - (y_1 - y_0)\sin{d}, \\ y_2 - y_0 &= (x_1 - x_0)\sin{d} + (y_1 - y_0)\cos{d}. \end{align}$$