Since both the arc and the approximation can be described by
parametric equations
and
, we could try to find for
each point
the closest point
such that
and to use this
mapping to find the maximal error along the
elliptical arc
. This method is accurate,
but involves lots of computation. A more practical method consist in
building once and for all an analytical model
approximating
and use it.
We first compute the true error by embedding two equation solvers. The
first solver is used to compute
for any given
(in other
words it performs the mapping), using a specific algorithm described
in another paper. The second solver is used to find the value of the
parameter which leads to the maximal error. It is necessary to use
very robust algorithms for this purpose, because the notion of
closest point is not continuous, so
seen as a
function of
is not continuous. A trivial example is given by a
point
traveling along the minor axis. When this point crosses
the ellipse center,
jumps from
to
. The
distance to the closest point, however, is continuous, only its
first derivative is discontinuous. These embedded solvers allow us to
compute for
for any arc, its value depend on
,
,
and
.
The next step involves identifying the behaviour of the error when the various parameters change. Using the semi major axis as a scaling parameter and plotting some curves, we first identify canonical parameters: the error model will be :
and |
For
between
and
, the error appears to be
almost a power of
, so we refine our model:
For symmetry reasons, it is sufficient to study the behaviour of the
origin and slope functions
and
for
between 0 and
. The functions decrease from a maximum value at 0 to a
minimum value at
. The peak near the maximum can be very sharp
for flat ellipses (
). This is because the curvature is very
important and changes rapidly near the semi major axis ends. We will
use several functions
to represent this behaviour. Our
model becomes:
Finally, the coefficients functions
present various
asymptotic behaviours when
varies from 0 to 1. In order to get a
good fit, we describe the functions as rational functions with a
quadratic numerator and linear denominator:
In fact, two sets of
coefficients were used, one set for
between 0 and
, and one set for
between
and
. The coefficients are given by
tables 1 and
2.
These coefficients were computed by curve fitting means. This imply
that for some points
this model gives errors
larger than the real ones, and at other points it gives smaller errors
(
). Multiplying this least square model by
a suitable safety rational fraction
, we obtain an upper bound
of the error:
.
This bound correctly overestimates the error, but is not too
conservative. The cumulative distribution function of
is quite smooth and the
mean value of the ratio is
.
|
|
|
|
|
||
| 0 | 0 | 3.92478 | -13.5822 | -0.233377 | 0.0128206 |
| 0 | 1 | -1.08814 | 0.859987 | 0.000362265 | 0.000229036 |
| 0 | 2 | -0.942512 | 0.390456 | 0.0080909 | 0.00723895 |
| 0 | 3 | -0.736228 | 0.20998 | 0.0129867 | 0.0103456 |
| 1 | 0 | -0.395018 | 6.82464 | 0.0995293 | 0.0122198 |
| 1 | 1 | -0.545608 | 0.0774863 | 0.0267327 | 0.0132482 |
| 1 | 2 | 0.0534754 | -0.0884167 | 0.012595 | 0.0343396 |
| 1 | 3 | 0.209052 | -0.0599987 | -0.00723897 | 0.00789976 |
|
|
|
|
|
||
| 0 | 0 | 0.0863805 | -11.5595 | -2.68765 | 0.181224 |
| 0 | 1 | 0.242856 | -1.81073 | 1.56876 | 1.68544 |
| 0 | 2 | 0.233337 | -0.455621 | 0.222856 | 0.403469 |
| 0 | 3 | 0.0612978 | -0.104879 | 0.0446799 | 0.00867312 |
| 1 | 0 | 0.028973 | 6.68407 | 0.171472 | 0.0211706 |
| 1 | 1 | 0.0307674 | -0.0517815 | 0.0216803 | -0.0749348 |
| 1 | 2 | -0.0471179 | 0.1288 | -0.0781702 | 2.0 |
| 1 | 3 | -0.0309683 | 0.0531557 | -0.0227191 | 0.0434511 |