The approximation principle is very simple: replace the real elliptical arc by a set of connected Bézier curves. The degree of the curves (linear, quadratic or cubic) is chosen according to the underlying graphical package and the number of curves and connecting points are chosen according to the required accuracy. Each curve will begin and end exactly on the elliptical arc.
We will describe algorithms to build Bézier curves matching an elliptical arc at both ends, and algorithms to compute quickly an upper bound of the approximation error for these curves. The approximation error estimation algorithms will allow to compute the error directly from the sub-arcs characteristics, without building the Bézier curve beforehand. In the linear case also, the exact error will be computed rather than an upper bound.
A simple iterative process can be used to build the appropriate curves
set. Simply compute the error which would result from splitting the
arc into
,
,
equal lengths parts in terms
of the curve parameter
, and stop the loop when this error drops
below the user-defined threshold. Then, build the corresponding
Bézier curves.
This process is not optimal in the sense that it can split the arc in more parts than strictly needed. However it is very simple to implement and very fast. Also since the error decreases a lot as the arc length decreases, very few iterations will be needed in practical cases.