Geometry – How to Find Center of an Arc Given Start Point, End Point, Radius, and Arc Direction

algebra-precalculuscirclesgeometry

Given an arbitrary arc, where you know the following values: start point $(x_0, y_0)$, end point $(x_1, y_1)$, radius ($r$) and arc direction (e.g. clockwise or counterclockwise from start to end), how can I calculate the arc's center? I know from this previous post (thanks!) that the center lies on the perpendicular bisector between the two points, but don't know how to calculate it.

thanks!

Best Answer

Don't write down too many equations to be solved, but produce the desired center ${\bf c}=(a,b)$ in a forward movement instead. Let ${\bf z}_i=(x_i,y_i)$ $\ (i=0,1)$ be the two given points, put $\epsilon:=1$ if the arc should go from ${\bf z}_0$ to ${\bf z}_1$ counterclockwise, and put $\epsilon:=-1$ otherwise.

Next, let $d:=|{\bf z_1}-{\bf z_0}|=\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}$ be the distance and ${\bf m}:=\bigl({x_0+x_1 \over2}, {y_0+y_1\over2}\bigr)$ be the midpoint of ${\bf z_0}$ and ${\bf z_1}$. Then

$${\bf n}:=(u,v):=\Bigl({x_1-x_0\over d},{y_1-y_0\over d}\Bigr)$$

is the unit normal in the direction ${\bf z_1}-{\bf z}_0$, and ${\bf n}^*:=(-v,u)$ is the unit vector you get by rotating ${\bf n}$ counterclockwise by $90^\circ$.

Given $r>0$ the center ${\bf c}$ has a distance $h:=\sqrt{r^2 -d^2/4}$ from ${\bf m}$, and the given $\epsilon$ together with ${\bf n}^*$ tell us in which direction we should go. In vectorial notation the center is given by

$${\bf c}\ =\ {\bf m}+\epsilon\ h\ {\bf n}^*\ ,$$

so that coordinate-wise we get

$$a={x_0+x_1 \over2}-\epsilon\ h\ v, \qquad b={y_0+y_1 \over2}+\epsilon\ h\ u\ .$$

Related Question