Bézier curve approximation of a circular Arc

3.4k Views Asked by At

I would like to know how I can get the coordinates of four control points of a Bézier curve that represents the best approximation of a circular arc, knowing the coordinates of three points of the corresponding circle. I would like at least to know the solution to this problem in the case where two of the known circle points are the two ends of a diameter of the circle.

2

There are 2 best solutions below

4
On

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector A = Q - P;
Vector U = new Vector(-A.Y, A.X);   // Perpendicular to PQ
double s = 2.0/3.0;                 // Scale factor
Vector[] controlPoints = { P, P + s*U, Q + s*U, Q };

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

8
On

You can use the following ways to find the control points of a cubic Bezier curve for approximating a circular arc with end points $P_0$, $P_1$, radius R and angular span A:

Denoting the control points as $Q_0$, $Q_1$, $Q_2$ and $Q_3$, then

$Q_0=P_0$,
$Q_3=P_1$,
$Q_1=P_0 + LT_0$
$Q_2=P_1 - LT_1$

where $T_0$ and $T_1$ are the unit tangent vector of the circular arc at $P_0$ and $P_1$ and $L = \frac{4R}{3}tan(\frac{A}{4})$.

Please note that above formula will give you a pretty good approximation for the circular arc. But it is not "the best" approximation. We can achieve an even better approximation with more complicated formula for the $L$ value. But for practical purpose, above formula is typically good enough.