[Math] Parametric equation of an arc with given radius and two points

circles

so I need the parametric equation of the arc. So, arc is a sector of a circle.

Parametric circle equation is:
$$
c \equiv f(t) = (\cos(t), \sin(t)),\quad 0\le t < 2\pi
$$
So, we just need to find proper domain of the function, actually $t_1$ and $t_2$, start and end of a sector.

Given two points $P_1$ and $P_2$, liying on circle, its center and radius how to find $t_1$ and $t_2$ using given points?
I need full parametric equation of this.

Thanks in advance!

Best Answer

Given the two endpoints $P$ and $Q$, the center $C$, and the radius $r$, then $$ s=2\arctan\left(\frac{P_y-C_y}{P_x-C_x+r}\right) $$ $$ t=2\arctan\left(\frac{Q_y-C_y}{Q_x-C_x+r}\right) $$ The equation would be $$ C+r(\cos(\theta),\sin(\theta)) $$ for $\theta$ between $s$ and $t$.

Beware that there are two circular arcs with center $C$ connecting the points $P$ and $Q$. If $s\lt t$, then the arc is counter-clockwise from $P$ to $Q$. If $s\gt t$, then the arc is counter-clockwise from $Q$ to $P$. If the $s$ and $t$ given above produce the wrong arc, just add $2\pi$ to the smaller one.


Given $P$, $Q$, and $r$ we can find two possibilities for $C$. First we need to define the linear map $$ T(x,y)=(-y,x) $$ which rotates by $\pi/2$ counter-clockwise. Then we get the formula $$ C=\frac{P+Q}2\pm T(P-Q)\sqrt{\left(\frac{r}{|P-Q|}\right)^2-\frac14} $$