Mathematical Problems in Engineering

Volume 2009, Article ID 327457, 12 pages

http://dx.doi.org/10.1155/2009/327457

## Approximate Implicitization of Parametric Curves Using Cubic Algebraic Splines

College of Statistics and Mathematics, Zhejiang Gongshang University, Hangzhou 310018, China

Received 25 February 2009; Revised 13 June 2009; Accepted 10 September 2009

Academic Editor: Alexander P. Seyranian

Copyright © 2009 Xiaolei Zhang and Jinming Wu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

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 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.

#### 1. 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 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 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 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.

#### 2. 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 we denote a triangle with vertices and , and by we denote the line passing through the points and . If we denote area as the area of triangle , then the barycentric coordinates of any point with respect to are defined by

Thus, any point with respect to can be described as

The Bernstein polynomials are shown as follows:

When any of the following is true: and , the Bernstein polynomial is set to zero.

Therefore, the Bézier triangle patch of degree three in Bernstein form is where all are called Bézier control points (see Figure 1).

*Definition 2.1. *Let be defined as (2.4), the cubic Bernstein-Bézier implicit curve on the triangle is defined to be the zero contour of , that is,

Theorem 2.2 (see [12]). *The directional derivative of Bézier triangle patch at the point with respect to the direction is given by
*

Lemma 2.3. *For the triangle and defined as in (2.4), if , then the curve passes through and is tangent with the line at . Similarly, if , then passes through and is tangent with the line at .*

*Proof. *Since the barycentric coordinate of and direction with respect to the triangle is and , respectively. Then the curve passes through and is tangent with the line at if and only if and . Thus, we get with Theorem 2.2. The later of this lemma can be proved similarly.

Lemma 2.4. *Let be defined as (2.4). Its curvature of at is given by
**
Similarly, its curvature of at is given by
*

*Proof. *It can be derived from the curvature formula [14] of implicit curves:
where and the other expressions can be understood similarly.

If the equation of cubic Bézier curve in the triangle is expressed in the form of with the restrictions of and , then from Lemmas 2.1 and 2.2, we can easily have the following.

Proposition 2.5. *For the triangle and is defined as (2.10), then the curve has the following properties: ** passes through the points and .,*(ii)* is tangent with line at , and tangent with line at , respectively,*(iii)*the curvatures of at the points and are and , respectively. *

The following result is due to Xu et al. [13].

Proposition 2.6. *For the triangle and let be defined as in (2.10), then the curve is -regular, that is, the straight lines that passes through and the point on the line intersecting the curve exactly once in the interior of the triangle . Moreover, has an arc from to , no inflection point or singular point in the interior of , and convex inside the triangle.*

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 and continuous algebraic splines.

#### 3. Approximate Implicitization of Parametric Curves

Given a planar parametric curve where and are arbitrary functions, such as trigonometric and exponential functions.

##### 3.1. 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 is called a cusp point of parametric curve if . (ii)A point is called an inflection point of if and . (iii)A point is called a vertical point of if and .A parametric curve 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 is not a cusp point, then the tangent direction is . (2)If is a cusp point, we assume that and . If is a finite number, we define . If approaches to infinity, we define , where and are called the left and right tangent directions of point .Let be a cusp point, and let and be the left and right tangent directions. Then the lines passing through and with directions and are called the left tangent line and right tangent line of at the point , respectively.

A curve segment is said to be triangle convex if the left tangent line and right tangent line meet at and the line segment and the curve segment form a convex region inside the triangle .

For any parametric curve , its curvature formula at any regular point is given by

The curvature at each critical point can be defined as follows.

(1)If is a vertical point, then its curvature is .(2)If is a cusp point, we assume and , where and are called the left and right curvatures of the curve at the point . (3)If 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.

##### 3.2. Segments Approximation

Let be the parametric values corresponding to the separated points and two endpoints. For each , let be the intersection point of the right tangent line at and the left tangent line at . Here, all the triangles are called the control triangles of .

Next, we show how to approximate each curve segment in its control triangle by using a cubic Bernstein-Bézier implicit curve (see Figure 2). Here, is assumed to be where are the barycentric coordinates with respect to the triangle .

The remaining three free parameters and in (3.2) can be determined by the following optimization problem: under the constraints and

Here, are the barycentric coordinates of the point with respect to the triangle , they are univariate functions in variable . So, by we denote .

The integral involves complicated computations and can be evaluated by numerical method such as Gaussian quadrature [17].

Proposition 3.1 (see [17]). *Let be the zeros of the orthogonal polynomial Legendre and let be the corresponding weights related to . Then the quadrature formula
**
of this type has algebraic accuracy . *

Any other interval of integration must be transformed into the standard interval . From now on, we let and is transformed into . Therefore, the numerical integration that we wish to minimize in (3.3) can be reduced: where

##### 3.3. Approximation Error

Given the rational parametric curve segment, where are polynomials.

Suppose its approximated curve in the interior of its control triangle is In this section, we will discuss the approximation error between and .

Let be the barycentric coordinates of the point with respect to the triangle . The approximation error is defined by

Here denotes the algebraic distance between the point and its approximated curve .

Theorem 3.2. *With the above notations,
**
where is a positive number.*

*Proof. *Obviously, we have

Since interpolates the two endpoints and , and keeps tangent directions at them, then it follows easily that

This fact is equal to and . It yields
If we let , then from simple computation.

Thus, if we set

then This completes the proof.

Theorem 3.3. *With the above proposed method, one obtains a piecewise continuous cubic algebraic curve which keeps the convexity of the original normal curve.*

*Proof. *The 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.

##### 3.4. Main algorithm

The algorithm of approximate implicitization for planar parametric curves using a cubic algebraic spline is outlined in what follows.

*Algorithm 3.4. *Approximate implicitization using cubic algrbraic spline.**Input:**A normal parametric curve , and a sufficiently small positive number .**Output:**A cubic algebraic spline satisfying each .**Step 1:**Divide the normal parametric curve into several triangle convex segments using the dividing algorithm [7]. Let be the parametric values corresponding to the critical points and two endpoints. For each compute the left and right directions and , left and right curvatures and at .**Step 2:**On each interval , perform the optimization problem (3.3) to compute the cubic curve segment . **Step 3:**If , then we subdivide the interval and repeat Step 2 on each subinterval.

#### 4. Numerical Examples

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

*Example 4.1. *Consider the following curves from [6, 7]:
The parameters for curves of and take values in , and . 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 and we denote the two segments in the left picture of Figure 3. By and we denote the two segments of which is subdivided in Figure 3(b). Other notations can be understood similarly.

We list the exact implicit form of the first two curves with Gröbner bases method as . Whereas, curve does not have an exact implicit form.

With comparison to the expressions of exact implicitization, we also list the implicit forms of the two approximate segments for in Figure 3(a) as follows:

#### 5. 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 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.

#### Acknowledgments

(1)This work was supported by the Natural Science Foundation of Zhejiang Province (nos.Y7080068 and Y6090211), and the Foundation of Department of Education of Zhejiang Province (nos. Y200802999 and 20070628).#### References

- L. Vehlo and J. Gomes, “Approximate conversion from parametric to implicit surfaces,”
*Computer Graphics Forum*, vol. 15, pp. 327–337, 1996. View at Publisher · View at Google Scholar - T. W. Sederberg, J. Zheng, K. Klimaszewski, and T. Dokken, “Approximate implicit using monoid curves and surfaces,”
*Graphical Model and Image Processing*, vol. 61, pp. 177–198, 1999. View at Publisher · View at Google Scholar - T. Dokken, “Approximate implicitization,” in
*Mathematical Methods for Curves and Surfaces, Oslo 2000*, T. Lyche and L. Schumaker, Eds., pp. 81–102, Vanderbilt University Press, Nashville, Tenn, USA, 2001. View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - T. Dokken and J. B. Thomassen, “Overview of approximate implicitization,” in
*Topics in Algebraic Geometry and Geometric Modeling*, vol. 334, pp. 169–184, American Mathmatics Society Contemporary Mathematics, Providence, RI, USA, 2003. View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. Yalcin, M. Unel, and W. A. Wolovich, “Implicitization of parametric curves by matrix annihilation,”
*International Journal of Computer Vision*, vol. 54, pp. 105–115, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - F. Chen and L. Deng, “Interval implicitization of rational curves,”
*Computer Aided Geometric Design*, vol. 21, no. 4, pp. 401–415, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Li, X. S. Gao, and S. C. Chou, “Quadratic approximation to plane parametric curves and its application in approximate implicitization,”
*Visual Computers*, vol. 22, pp. 906–917, 2006. View at Publisher · View at Google Scholar - R. Wang and J. Wu, “Approximate implicitization based on RBF networks and MQ quasi-interpolation,”
*Journal of Computational Mathematics*, vol. 25, no. 1, pp. 97–103, 2007. View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. M. Wu and R. H. Wang, “Approximate implicitization of parametric surfaces by using compactly supported radial basis functions,”
*Computers and Mathematics with Applications*, vol. 56, pp. 3064–3069, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. M. Wu, Y. S. Lai, and X. L. Zhang, “Approximate implicitization of parametric curves by using quadratic algebraic splines,”
*Journal of Information and Computational Science*, vol. 5, pp. 2181–2186, 2008. View at Google Scholar - T. Sederberg, “Planar piecewise algebraic curves,”
*Computer Aided Geometric Design*, vol. 1, pp. C241–C255, 1984. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - G. Farin,
*Curves and Surfaces for Computer Aided Geometric Design: A Practical Guide*, Academic Press, Boston, Mass, USA, 4th edition, 1996. - G. Xu, C. L. Bajaj, and W. Xue, “Regular algebraic curve segments(I)—definitions and characteristics,”
*Computer Aided Geometric Design*, vol. 17, no. 6, pp. 485–501, 2000. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. Goldman, “Curvature formulas for implicit curves and surfaces,”
*Computer Aided Geometric Design*, vol. 22, no. 7, pp. 632–658, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Paluszny and R. Patterson, “A family of tangent continuous algebraic splines,”
*ACM Transaction on Graphics*, vol. 12, pp. 209–232, 1993. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - M. Paluszny and R. Patterson, “Geometric control of ${G}^{2}$-cubic $\text{A}$-splines,”
*Computer Aided Geometric Design*, vol. 15, no. 3, pp. 261–287, 1998. View at Publisher · View at Google Scholar · View at MathSciNet - R. H. Wang,
*Numerical Approximation*, Higher Education Press, Beijing, China, 1999.