Next: error estimation
Up: cubic Bézier curve
Previous: cubic Bézier curve
  Contents
control points choice
Since we want the Bézier curve endpoints to match the elliptical arc
endpoints, finding the first two control points of the cubic Bézier
curve is done as for linear Bézier curves:
Matching of the Bézier curve and elliptical arc slopes at endpoints
allows us to define the two remaining control points using only two
scalar parameters:
In order to have the same orientation for the elliptical arc and its
approximation,
and
should both be positive. Replacing the
and
scalars by
and
leads
to the simple definition of
and
:
With these definitions of the control points, the first and second
derivatives of the Bézier curves are:
introducing these derivatives in equation (1)
gives the signed curvatures at Bézier curve endpoints:
The curvatures of the elliptical arc at endpoints are computed the
same way, introducing the ellipse parametric equation
derivatives (4) and (5) into
equation (1):
where
and
are the coordinates of
.
In order to find the values of
and
, we state
that the signed curvature of the Bézier curve and elliptical arc at
endpoints should be the same, so we combine
systems (13) and
(14):
This system can be further simplified by using the ellipse parametric
equation (3) and its derivatives (4) and
(5) which imply the following relations:
So after simplifying by
, the system becomes:
Introducing
and
multiplying by
this can be written:
Subtracting one equation from the other, we obtain:
This implies the system has two sets of solutions. Since we have
preprocessed our arcs to ensure
, we know
that
, so
can be computed without loss of accuracy
and
can be extracted from square roots without sign
change. The first set of solutions is:
It is obvious that all these solutions are real ones. For the first
set of solutions it is also obvious that one solution is always
positive while the other one is always negative. Remembering we are
only interested in positive solutions, we can choose the positive one.
For the second set of solutions, one solution becomes negative or null
when
, i.e. if
.
The full set of positive solutions is therefore:
or (only if
):
or (only if
):
Some tests show that all these solutions are acceptable, there is not
a unique way to set up a cubic Bézier curve with the matching
criteria we have chosen. Since the first solution is both the simplest
one (
) and has the wider applicability domain, we
will use this one only and forget the other solutions.
Next: error estimation
Up: cubic Bézier curve
Previous: cubic Bézier curve
  Contents
Luc Maisonobe
2005-05-29