Circular Arc Parametrization not using Radius

558 Views Asked by At

In an optimization problem I have to parametrize a circular arc. Thus far, I have reduced a more general problem to the figure below:

Circular Arc

The figure shows a symmetrical circular arc, with chord length L, and the internal angle beta at both end points. The coordinate system has its origin at the left end point. The x axis points along the chord, and the y-axis upward in the image (not pictured, sorry).

I wish to find points on this arc, preferably equally spaced on the arc, but since the angle beta is low (<10° in most cases), points equally spaced on the x-axis would do.

My problem is that the angle beta can be extremely small, zero, or negative. If I were to calculate a radius, it may be extremely large, infinite or complex. I want to avoid this if possible because it would cause numerical problems.

How can I parametrize this arc without calculating the radius, and using Cartesian coordinates with an origin as described above?

I can filter the negative case out with a control structure, if necessary.

2

There are 2 best solutions below

9
On BEST ANSWER

If you're willing to use the second-order Taylor polynomial to the circle, which is visually indistinguishable from the circle for $|\beta| < 10^{\circ}$, one numerically-stable formula is $$ y = \frac{L}{2}\, \frac{\sin \beta}{1 + \cos\beta} - \frac{\sin\beta}{L}\left(x - \frac{L}{2}\right)^{2}. $$ The diagram shows the circle making an angle of $18^{\circ}$ in blue, and the parabola superposed as a fine green curve, overshooting by about half a line width at the ends:

A shallow arc of circle and parabolic approximation


Edit: In the same vein, a numerically stable exact equation of the circle is $$ y = \frac{L}{2}\left[ \frac{\sin \beta}{1 + \cos\beta} - \frac{\bigl(1 - (2x/L)\bigr)^{2} \sin\beta}{1 + \sqrt{1 - \bigl(1 - (2x/L)\bigr)^{2} \sin^{2}\beta}} \right]. $$

3
On

Andrew's answer is correct and very applicable. Going forward, I have stumbled upon annother solution, that is both non-recursive and provides points equally spaced along the chord. I thought this was worth mentioning here, for google to find.

Robert Schaback wrote a paper titled "Planar Curve Interpolation by Piecewise Conics or Arbitrary Type" (available here; only section 2 is directly relevant), in which he details a method to interpolate between three points using arbitrary conics given the slopes at the two outer points. This interpolation is, as Schaback proves, unique, so only one conic fits the data.

Since a circle is a special case of a conic, and we can produce enough information to apply Schaback's method to match a circle, we know that the result must be a circle. We already know the slopes ($\tan(\beta)$ and $\tan(-\beta)$) as well as the starting and end points. All that is now required is a point on the arc, and that is easily obtained by calculating the position of the arc's apex. The x position is half the length between the end points, and the height can be calculated from the well-known equations of circular arcs.

$$ h=\frac{L}{2}\,\frac{1-\cos(\beta)}{\sin(\beta)} $$