length of arch by startpoint endpoint and center of arch

414 Views Asked by At

I have a software that draws arches. What I need is to calculate the arch length (actual lenght of the line) by knowing only these informations:

  • x,y coordinates of startpoint of the arch
  • x,y coordinates of endpoint of the arch
  • x,y coordinates of the center of the arch (by center I mean the center of the theoretical circle it forms, center of rotation basically)
  • each arch is drawed counterclockwise

Thanks!

3

There are 3 best solutions below

0
On BEST ANSWER

Let's do some simple geometry:

enter image description here

From the data, we can obtain directly the lengths $OA, OB, AB$. The length $\ell$ of the arch is equal to $2 O\mkern-1.5muA\,\theta$. Now $$ \tan \theta=\dfrac{OA}{OI}=\frac{OA}{\sqrt{OA^2-OI^2}}=\frac{OA}{\sqrt{OA^2-AI^2}}=\frac{OA}{\sqrt{OA^2-\cfrac{AB^2}{4}}}=\frac{2OA}{\sqrt{(2OA)^2-AB^2}}$$ so that $$\ell=\frac{(2OA)^2}{\sqrt{(2OA)^2-AB^2}}.$$

Explicitly:$$\ell=\frac{4\bigl((x_A-x_O)^2+(y_A-y_O)^2\bigr)}{4\bigl((x_A-x_O)^2+(y_A-y_O)^2\bigr)-\bigl((x_A-x_B)^2+(y_A-y_B)^2\bigr)}.$$

0
On

Let $A\equiv (x_A,y_A)$ be the startpoint, $B\equiv (x_B,y_B)$ the endpoint and $C\equiv (x_C,y_C)$ the center.

Find the radius $r=AC$. The angle between the stright line passing thorough $A$ and $C$ and the $x$ axis is such that: $$ \theta_1=\arccos\left(\dfrac{x_A-x_C}{r}\right)=\arcsin\left(\dfrac{y_A-y_C}{r}\right) $$ In the same way find the angle $\theta_2$ between the stright line passing thorough $B$ and $C$ and the $x$ axis. Now the angle subtended by the arc is $\theta=\theta_2-\theta_1$ and his leght is $\theta r$.

0
On

It is a trigonometric calculation in a circle.

Let the points P ,C, Q be the start, center and endpoints on arch circle .

Find lengths PC, PQ and QC using usual distance formula between two known points.

After verifying that given PC = CQ , let it be called R and also let $ PQ = 2 a, $

calculate half angle $ \alpha $ subtended at circle center C as $ \alpha = \sin^{-1} \dfrac {a}{R} $

The arch arc length is $$ L = 2 R \alpha $$