Approximate Implicitization of Parametric Curves Using Cubic Algebraic Splines

This paper presents an algorithm to solve the approximate implicitization of planar parametric curves using cubic algebraic splines. It applies piecewise cubic algebraic curves to give a global G2 continuity approximation to planar parametric curves. Approximation error on approximate implicitization of rational curves is given. Several examples are provided to prove that the proposed method is flexible and efficient.


Introduction
Parametric curves/surfaces and implicit curves/surfaces are two important topics in computer-aided geometry design and geometric modelling.With the parametric form, it is easy to generate points on a general curve/surface and plot it.On the other hand, it is convenient to determine whether a point is on, inside, or outside a given solid with the implicit treatments.
For any rational parametric curve/surface, we can convert it into implicit form.However, for a general parametric curve/surface, we usually cannot compute its exact implicit form.Even though its exact implicit form can be computed, the curve/surface implicitization always involves relatively complicated computation and the degree of the implicit curves/surfaces is high.Another difficulty is that implicit curves/surfaces may have unexpected components and self-intersections which lead to computational instability and topological inconsistency in geometric modeling.All these unsatisfied properties limit the applications of the exact implicitization especially surface implicitization in practical fields.
Due to these reasons, finding approximate implicitization of parametric curves/surfaces has some practical significance.In recent years, many researches have proposed several approaches to solve this problem 1-10 .The earlier work on approximate Mathematical Problems in Engineering implicitization was done by Velho and Gomes 1 , who presented an approximate implicitization scheme from parametric surfaces to implicit surfaces based on wavelet analysis.In 1999, Sederberg et al. 2 proposed an approach to solve approximate implicitization problem by using monoid curves and surfaces.The method used by Sederberg was made more available in Dokken's work 3, 4 .In 2004, Chen and Deng 6 presented the concept of interval implicitization of rational curves and developed the corresponding effective algorithm.In 2006, Li et al. 7 considered the approximate implicitization of planar parametric curves by using the piecewise quadratic Bézier spline curves with G 1 continuity.In 2007, Wang and wu 8 discussed the approximate implicitization of general parametric curves based on radial basis function networks and multiquadric MQ quasi-interpolation.Very recently, Wu et al. 9, 10 discussed the approximate implicitization of parametric surfaces with the introduction of normal constraint points based on multivariate interpolation by using compactly supported radial basis functions, and approximate implicitization of parametric curves by using quadratic algebraic splines.
In this paper, an algorithm is proposed to solve the approximate implicitization of planar parametric curves using cubic Bernstein-Bézier implicit curves.Our piecewise cubic curves are used to give a global G 2 continuity approximation, because they keep the same endpoints, the corresponding tangent directions, and curvatures at the separated points with the approximated segments.Approximation error on rational curves is also given.

Cubic Bernstein-B ézier Implicit Curve
In this section, some concepts and results on Bernstein-Bézier implicit curve are presented.For more details, the readers may refer to 11-13 and references therein.
By T : p 1 p 2 v 12 we denote a triangle with vertices p 1 x 1 , y The Bernstein polynomials are shown as follows: When any of the following is true: i, j, k < 0 and i, j, k > 3, the Bernstein polynomial B 3 ijk u, v, w is set to zero.Therefore, the Bézier triangle patch of degree three in Bernstein form is where all b ijk are called Bézier control points see Figure 1 .
Definition 2.1.Let f u, v, w be defined as 2.4 , the cubic Bernstein-Bézier implicit curve C on the triangle T : p 1 p 2 v 12 is defined to be the zero contour of f u, v, w , that is, Theorem 2.2 see 12 .The directional derivative of Bézier triangle patch at the point p u, v, w with respect to the direction α α 1 , α 2 , α 3 is given by Proof.Since the barycentric coordinate of p 1 and direction p 1 v 12 with respect to the triangle T : p 1 p 2 v 12 is 1, 0, 0 and 1, 0, −1 , respectively.Then the curve C passes through p 1 and is tangent with the line p 1 v 12 at p 1 if and only if f 1, 0, 0 0 and D 1,0,−1 f 1, 0, 0 0. Thus, we get b 300 b 201 0 with Theorem 2.2.The later of this lemma can be proved similarly.
Lemma 2.4.Let f u, v, w be defined as 2.4 .Its curvature of C at p 1 is given by

2.7
Similarly, its curvature of C at p 2 is given by

2.8
Proof.It can be derived from the curvature formula 14 of implicit curves: where f x ∂f/∂u ∂u/∂x ∂f/∂v ∂v/∂x ∂f/∂w ∂w/∂x and the other expressions can be understood similarly.
If the equation of cubic Bézier curve f u, v, w in the triangle T : with the restrictions of b 210 > 0 and b 120 > 0, then from Lemmas 2.1 and 2.2, we can easily have the following.
Proposition 2.5.For the triangle T : p 1 p 2 v 12 and f u, v, w is defined as 2.10 , then the curve It is noted out that our constructed cubic algebraic curve 2.10 is coincided with the reduced form in 15, 16 , where they use them to construct a family of G 1 and G 2 continuous algebraic splines.

Approximate Implicitization of Parametric Curves
Given a planar parametric curve C t x t , y t , t ∈ 0, 1 , where x t and y t are arbitrary functions, such as trigonometric and exponential functions.

Curve Segments
In order to solve the approximate implicitization problem using cubic algebraic splines, a basic problem is how to divide the planar parametric curves into several segments.Some concepts and definitions are reviewed.For more details, the readers may refer to 7 .
A natural idea is to divide the parametric curve into several curve segments possessing relatively good shape, separated by the following three types of critical points.i A point C t 0 is called a cusp point of parametric curve C t if x t 0 y t 0 0.
ii A point C t 0 is called an inflection point of C t if x t 0 y t 0 − x t 0 y t 0 0 and x t 0 / 0.
iii A point C t 0 is called a vertical point of C t if x t 0 0 and y t 0 / 0.
A parametric curve C t is called normal if it has a finite number of critical points and at each critical point the tangent direction can be defined as follows.
1 If C t 0 is not a cusp point, then the tangent direction is x t 0 , y t 0 .
2 If C t 0 is a cusp point, we assume that s − lim t → t 0 − y t /x t and s lim t → t 0 y t /x t .If s − s is a finite number, we define T − 1, s − T 1, s .If s − s approaches to infinity, we define T − 0, 1 T 0, 1 , where T − and T are called the left and right tangent directions of point C t 0 .
Let p 0 be a cusp point, and let T − and T be the left and right tangent directions.Then the lines passing through p 0 and with directions T − and T are called the left tangent line and right tangent line of C t at the point p 0 , respectively.
A curve segment C t x t , y t , t ∈ t 1 , t 2 is said to be triangle convex if the left tangent line and right tangent line meet at v 12 and the line segment p 1 p 2 and the curve segment C t , t ∈ t 1 , t 2 form a convex region inside the triangle p 1 p 2 v 12 .
For any parametric curve C t , its curvature formula at any regular point C t is given by κ t x t y t − x t y t x t 2 y t 2 3/2 .

3.1
The curvature at each critical point can be defined as follows.
1 If p 0 C t 0 is a vertical point, then its curvature is κ t 0 .
2 If p 0 C t 0 is a cusp point, we assume κ − lim t → t 0 −0 κ t and κ lim t → t 0 0 κ t , where κ − and κ are called the left and right curvatures of the curve C t at the point p 0 .
3 If p 0 C t 0 is an inflection point, then its curvature is zero.
Throughout this paper, we directly adopt the dividing algorithm in 7 to divide the input normal parametric curve into several triangle convex segments, separated by the above three types of critical points.

Segments Approximation
Let t i , i 0, 1, . . ., n be the parametric values corresponding to the separated points and two endpoints.For each i, i 0, 1, . . ., n − 1, let v i,i 1 x i,i 1 , y i,i 1 be the intersection point of the right tangent line at p i x t i , y t i and the left tangent line at p i 1 x t i 1 , y t i 1 .Here, all the triangles p i p i 1 v i,i 1 , i 0, 1, . . ., n − 1, are called the control triangles of C t .
Next, we show how to approximate each curve segment C t , t ∈ t i , t i 1 in its control triangle p i p i 1 v i,i 1 by using a cubic Bernstein-Bézier implicit curve Here, f u i , v i , w i is assumed to be where u i , v i , w i are the barycentric coordinates with respect to the triangle p i p i 1 v i,i 1 .
The remaining three free parameters b of this type has algebraic accuracy 2n 1.
Any other interval t i , t i 1 of integration must be transformed into the standard interval −1, 1 .From now on, we let y 1/2 t i 1 − t i x t i t i 1 and x ∈ −1, 1 is transformed into y ∈ t i , t i 1 .Therefore, the numerical integration that we wish to minimize in 3.3 can be reduced: where

Approximation Error
Given the rational parametric curve segment, In this section, we will discuss the approximation error between C t , t ∈ t i , t i 1 and C i .Let u i t , v i t , w i t be the barycentric coordinates of the point p x t /w t , y t /w t with respect to the triangle p i p i 1 v i,i 1 .The approximation error is defined by Here |s i u i t , v i t , w i t | denotes the algebraic distance between the point p C t , t ∈ t i , t i 1 and its approximated curve C i .

Theorem 3.2. With the above notations,
where M is a positive number.
Proof.Obviously, we have

Mathematical Problems in Engineering
Since C i interpolates the two endpoints p i C t i and p i 1 C t i 1 , and keeps tangent directions at them, then it follows easily that This fact is equal to This completes the proof.
Theorem 3.3.With the above proposed method, one obtains a piecewise G 2 continuous cubic algebraic curve which keeps the convexity of the original normal curve.
Proof.The G 2 continuity of the piecewise cubic approximate splines is a direct consequence of the fact that the cubic algebraic curves have the same tangent directions and curvature with the original curve.Furthermore, the curve is divided into triangle convex segments and the cubic curve segments are convex with no inflection points, which also keep the convexity of the curve.

Main algorithm
The algorithm of approximate implicitization for planar parametric curves using a cubic algebraic spline is outlined in what follows.
Input: A normal parametric curve C t x t , y t , t ∈ 0, 1 , and a sufficiently small positive number ε.
Step 1: Divide the normal parametric curve into several triangle convex segments using the dividing algorithm 7 .Let t i , i 0, 1, . . ., n be the parametric values corresponding to the critical points and two endpoints.For each i 0, 1, . . ., n, compute the left and right directions T i− and T i , left and right curvatures κ i− and κ i at C t i .
Step 2: On each interval t i , t i 1 , i 0, 1, . . ., n − 1, perform the optimization problem 3.3 to compute the cubic curve segment C i { u i , v i , w i | s i u i , v i , w i 0}.
Step 3: If E s i > ε, then we subdivide the interval t i , t i 1 and repeat Step 2 on each subinterval.

Numerical Examples
In this section, some numerical examples are provided to illustrate that the proposed approximate implicitization method is flexible and effective.

4.1
The parameters for curves of C 1 t , C 2 t , and C 3 t take values in −1, 1 , 0, 1 , and −1, 1 .Their approximate cubic algebraic splines are shown in Figures 3, 4, and 5 and their approximation errors are listed in Tables 1, 2, and 3.
In the following figures, we simultaneously give the original parametric curves, the cubic algebraic splines, and the separated points, denoted by black line, red line, and black dots, respectively.By s 1 and s 2 , we denote the two segments in the left picture of Figure 3.By s 11 and s 12 , we denote the two segments of which s 1 is subdivided in Figure 3    We list the exact implicit form of the first two curves with Gr öbner bases method as g i x, y 0, i 1, 2. Whereas, curve C 3 t does not have an exact implicit form.

Conclusion
We have described an algorithm to solve approximate implicitization of planar parametric curves using piecewise cubic algebraic splines.With the proposed algorithm, we obtain a global G 2 continuous cubic algebraic spline which keeps the direction, the curvature, and the convexity of the original normal parametric curve with simple computation.The proposed method is flexible and effective from the numerical examples.However, the proposed algorithm is hard to be generalized to solve approximate implicitization of parametric surfaces directly.Therefore, the problem on approximate implicitization of parametric surfaces by algebraic spline surfaces remains to be our future work.

Figure 1 :
Figure 1:The control points of a Bézier triangle patch of degree three.

Figure 3 :
Figure 3: C 1 t and its approximate cubic algebraic splines.
b .Other notations can be understood similarly.Mathematical Problems in Engineering a b

Figure 4 :
Figure 4: C 2 t and its approximate cubic algebraic splines.
1 , p 2 x 2 , y 2 , and v 12x 12 , y 12 , and by p 1 p 2 we denote the line passing through the points p 1 and p 2 .If we denote area v 1 v 2 v 3 as the area of triangle v 1 v 2 v 3 , then the barycentric coordinates

w . 2.6 Lemma 2.3. For the triangle T : p 1 p 2 v 12 and
f u, v, w defined as in 2.4 , if b 300 b 201 0, then the curve C passes through p 1 and is tangent with the line p 1 v 12 at p 1 .Similarly, if b 030 b 021 0, then C passes through p 2 and is tangent with the line p 2 v 12 at p 2 .
with respect to the triangle p i p i 1 v i,i 1 , they are univariate functions in variable t.So, by G i t , we denote G i t f u i t , v i t , w i t .The integral involves complicated computations and can be evaluated by numerical method such as Gaussian quadrature 17 .

Table 1 :
Approximation error of curve C 1 t .

Table 2 :
Approximation error of curve C 2 t .

Table 3 :
Approximation error of curve C 3 t .