# Approximate a circle with cubic Bézier curves

A good cubic Bézier approximation to a circular arc is:
, , ,

This yields an arc on the unit circle centered about the origin, starting at and and ending at , with the least amount of radial drift.

Bézier curves are often used to generate smooth curves because Bézier curves are computationally inexpensive and produce high-quality results. The circle is a common shape that needs to be drawn, but how can the circle be approximated with Bézier curves?

The standard approach is to divide the circle into four equal sections, and fit each section to a cubic Bézier curve. This reduces the problem to a matter of fitting a cubic Bézier curve to a right circular arc.

The standard approach imposes the following constraints:

1. The endpoints of the cubic Bézier curve must coincide with the endpoints of the circular arc, and their first derivatives must agree there.
2. The midpoint of the cubic Bézier curve must lie on the circle.

The general formula of a cubic Bézier curve is:
,

The first constraint implies that:

The second constraint provides the value of :

This gives the approximation:

The maximum radial drift is with this approximation.

In this approximation, the Bézier curve always falls outside the circle, except momentarily when it dips in to touch the circle at the midpoint and endpoints.

## A better approximation

However, a better approximation is possible if we replace the final constraint with a new constraint:

1. The endpoints of the cubic Bézier curve must coincide with the endpoints of the circular arc, and their first derivatives must agree there.
2. The maximum radial distance from the circle to the Bézier curve must be as small as possible.

This new constraint explicitly requires the Bézier curve to stay near the circle—resulting in a better fit.

The first constraint yields the parametric form of the Bézier curve:
, where:

The radial distance from the arc to the Bézier curve is:

This radial distance function, , has minima at , and maxima at .

Because the Bézier curve is symmetric about , the two maxima have the same value. The radial deviation is minimized when the magnitude of this maximum is equal to the magnitude of the minimum at .

This gives the ideal value for :

The maximum radial drift is with this approximation. This is better than the standard approximation.

Here is the final result:

Figure 4 was created using the Bézier curves:

with .