Abstract

This paper focuses on the orthogonal projection of rational curves onto rational parameterized surface. Three symbolic algorithms are developed and studied. One of them, based on regular systems, is able to compute the exact parametric loci of projection. The one based on Gröbner basis can compute the minimal variety that contains the parametric loci. The remaining one computes a variety that contains the parametric loci via resultant. Examples show that our algorithms are efficient and valuable.

1. Introduction

Computing the projection of a point onto a surface is to find a closest point on the surface, and projection of a curve onto a surface is the locus of all points on the curve project onto the surface. The orthogonal projection problem attracted great interest in minimal distance computation [1, 2], calculating the intersection of curves and surfaces [3], surface curve design [4, 5], curve or surface selecting [6], and shape registration [7]. And many algorithms have been developed. The work in [8] proposed a second-order tracing method for calculating the orthogonal projection of parametric curves onto B-spline surfaces. The work in [9] focused on projecting points onto conics. The work in [10] developed a second-order algorithm for orthogonal projection onto curves and surfaces. The work in [11] used a torus patch to approach the surface in projection computation. In [12], an efficient algorithm is presented for projecting a point to its closest point. Among these methods, the common steps are to find the approach projective point in normed space by iteration techniques which rely on good initial values and then determine the approximate parameters in parametric space, which is called a point inversion problem.

Numerical methods above are efficient and stable in computing orthogonal projection and are easy applied. However, there exist common drawbacks as follows: the computation relies on samplings and the step size determines the accuracy of the result. The projective locus might be invisible while the locus is smaller than the step size. And the curve is always assumed to keep close enough to the surface so that a single solution is guaranteed. Symbolic methods would be necessary to overcome the shortcomings. Previous applications of symbolic methods in CAGD could be seen in [1315]. In order to apply symbolic methods, we only are concerned about curves and surfaces that have rational parametric representations. As known to all, common representations of surface and curves are NURBS [16], which is formed by rational patches. And since the parametric locus could uniquely determine the projection in 3D space, we focus on the parametric locus of orthogonal projection. Moreover, the range of surfaces and curves is restricted in .

Classical symbolic tools applied in this paper are regular systems [17] (triangular decomposition), Gröbner basis [18], and resultant (see [19, 20]). Parametrization of curves and surfaces is a hard task in the area [21]. But, for convenience, we only consider parametric curves and surfaces. With the rational assumptions of curves and surfaces, the orthogonal condition would be transformed into a simple polynomial system. Then the orthogonal projection problem equals determining the real solution of the polynomial system, which can be solved by symbolic or mix symbolic-numeric techniques.

In this paper, three algorithms are presented to compute the orthogonal projection of a rational parameterized curve onto a rational parameterized surface. The algorithm based on regular systems is able to compute the exact loci of orthogonal projection, and the false points will be detected. By means of Gröbner bases, we can get the minimal variety that contains the projective loci. And the resultant method efficiently computes a variety that contains the projective loci. The former two algorithms can particularly be used to compute point projections.

Compared with numerical algorithms, our algorithms have distinct advantages:(1)We generate the exact results without numerical errors.(2)Both point projection and curve projection are included.(3)There is no point inversion problem involved since we directly are concerned about the parametric loci.

In addition, the decomposition method in [22] would generate duplicate zeros between different regular systems and Huang and Wang [15] proposed a method to simplify the result. We improve Huang’s method and directly consider the symbolic representation of zeros. Once the redundancy of zeros is judged, the corresponding regular system could be deleted without changing the zeros.

An early version of this paper has been reported on the 4th International Congress on Mathematical Software [23], in which the main algorithms and proofs are missing. The rest of the paper is organized as follows. In Section 2, some concepts and properties of regular systems, Gröbner basis, and resultant are introduced. Section 3 presents the main theorems. And Section 4 describes the algorithms based on the theorems in Section 3. In Section 5, we demonstrate nontrivial examples and experiment results. This paper is summarized in a brief conclusion in Section 6.

2. Preliminaries

Assume that is a field with characteristic 0 and denotes the polynomial ring on with ordered indeterminates . For a polynomial , is called the zero set of , where is a field extension of . And is simply denoted as in this paper when there is no ambiguity.

Definition 1. For , one defines where .

Let , be two polynomial sets contained in . We denote , and . is called a polynomial system.

For a polynomial , we say , if is the largest such that appears in . If , then has the following expression:where and . is called the of , denoted by .

Let be a polynomial set; then denotes the set for . Note that , .

Definition 2. A polynomial system is called regular if the following conditions hold: (a), and , , ;(b), , , and .

Proposition 3. Let be a regular system; then

Regular system was proposed by [17], and an algorithm was given to decompose the zeros of a polynomial system into the union of zeros of a limited number of regular systems. Properties of regular systems could be referred to in [17, 22].

Definition 4. Let be a nonempty polynomial ideal, and is a finite set contained in . is called a Gröbner basis of , if and only if, for , , such that , where stands for the leading power product of under a defined term order (e.g., lexicographical order).

Proposition 5 (the elimination theorem [18, 20, 24]). Let be a nonempty polynomial ideal; is a defined order such that , where and . If is a Gröbner basis of , then is a Gröbner basis of .

For a polynomial ideal , we denote to be the radical of . Note that . The saturation of with respect to a polynomial is defined to be the set . Let ; the Zariski closure of is the smallest algebraic variety that contains (see [20]).

It is obvious that . Furthermore,

Proposition 6. Let be a polynomial ideal. Given a nonzero polynomial , let be a Gröbner basis of under elimination term order , where is a new added variable; then one has

Let be a commutative ring with identity. Consider :The Sylvester Matrix of and with respect to is defined to bewhere the former rows are only related to the coefficients of and the last rows are only involved with the coefficients of .

We denote to be the determinant of . And is called the resultant of and with respect to . If , then . Let denote the leading term coefficient of in variable .

Proposition 7 (see [19]). Let .(1)If , then(2)Conversely, if , then one of the following holds:(a);(b), where is an indeterminate;(c), such that .

Remark 8. For a polynomial , if , where , then we denote . Then entry (b) of statement equals

Lemma 9 (see [21, 25]). An algebraic curve is rational if and only if .

3. The Main Results

In this section, we consider the orthogonal projection of a rational parameterized curve onto a rational parameterized surface.

Rational parameterized curves are defined as the images of mappings formwhere , .

And rational parameterized surface is defined as the images of mappings form where , .

Given a rational parameterized curve with parametric equation and a rational parameterized surface with parametric equation , the orthogonal projection of onto is defined to be the set of points satisfying the following condition:where stands for the normal vector of of at . Since is parallel with , the above condition can be written asThe problem of orthogonal projection is to find the solution of system (13). And note that (13) can be treated as polynomial systems, where are rational mappings.

To study the locus of orthogonal projection in three-dimensional space, we can equivalently discuss the parametric locus of orthogonal projection. We denote .

In the rest of the paper, let be the parametric equation of rational curve and let be the parametric mapping of surface .

Proposition 10. One denotesThen .

Proof. Equation (13) could be simplified as the following form by substituting and :That implies , and , as will not be denominators.

Theorem 11. are regular systems with the variable order , such that . Thenand .

Proof. Since it is directly that . And the second statement of the theorem holds according to Proposition 3.

Remark 12. For the polynomial system , an algorithm , such that had been established [17], where means the variable order is .

Theorem 13. is a Gröbner basis ofunder a variable order . ThenFurthermore, .

Proof. According to the properties of radical ideal and saturation of ideal, we haveThe last two equations hold under the statement of Proposition 6. And apparently .

Lemma 14. Let be a polynomial set and , . Then

Proof. For , that is, , s.t. and , we have .
Conversely, ifthen , s.t. . So .
In summary, .

Theorem 15. One hasFurthermore, if (a),(b) and ,(c), then

Proof. Proposition 7 induces the fact thatand it follows from Lemma 14 thatTheMoreover, according to conditions (a), (b) and Proposition 7, we have . And condition (c) induced by Lemma 14 that . In that way

4. Algorithms

For a polynomial set and a set , we denote . Then, for a polynomial system , we have = . Letting we define .

Theorem 11 induces that the exact loci of projection could be decomposed into the union of zeros of regular systems, which could be in a complex form. In order to analyze the result easier, we developed an algorithm, which is improved from SIM [15], to simplify regular systems.

Proposition 16. Algorithm 1 is correct.

INPUT  
OUTPUT  ,
where , and .
Step 1.
, , , .
 For in do
  If , then
   For in do . end do;
   .
  Else .
 End do;
Step 2.
 For in do
  ;
  For in do
   If such that
    then delete from ; ;
   Else if such that ,
    then delete from ;
    ;
   Else if such that ,
    then ;
  End do;
  If then ;
  Else .
 End do;
Step 3.
 For in do
  For in do
   If ,
   then ; ; break;
  End do;
 End do;
Step 4. Return .
// returns all the irreducible factors of

Proof. Steps and are similar to SIM; we only need to prove Step .
In Step , if , thenSo can be deleted from and would be substituted by .

Given a rational curve and a rational surface , Algorithm 2 computes the exact parametric loci of the orthogonal projection of onto .

Input  ,
Output  .
Step 1. Generate the polynomial system .
Step 2. Decompose in to the union of regular systems, Let .
Step 3. Let
Step 4. .
Step 5. Return .

Algorithm 3 returns the minimal variety that contains . If , then consists of finitely many points. If , thenSince are prime ideals, are irreducible components of that do not contain each other. If , then equals the whole parametric plane.

Input  ,
Output  .
Step 1. Generate the polynomial system .
Step 2. Compute the Gröebner basis of under the term order such that .
Step 3. Let . Let to be the dimension of .
Step 4. If , then return .
Step 5. If , then decompose into the intersection of prime ideals: .
 Return .
Step 6. If , return .

Algorithm 4 calculates a variety that contains . Note that is a polynomial in and factorize into irreducible algebraic curves. For each irreducible algebra curve , if , then can be rational parameterized.

Input  , , where .
Output A variety that contains .
Step 1. Generate the polynomial system .
Step 2. Compute .
Step 3. Factorize , is a irreducible factor of in .
Step 4.
 Let ;
 For to do
  ;
  If , .
  Else .
 End for
Step 5. Return .
// [21] returns the parametric presetations of in parameters .

Theorem 17. One has

Proof. It is a direct consequence of the above discussion thatNote that and are varieties. And is the minimal variety that contains ; then .

5. Examples and Comparison

Example 1 (point projection). Consider the algebraic surface :where , , , . Let be a point in 3D space. could be treated as a constant function with variable .
Algorithm 2 yields , whereAlgorithm 3 returns the same loci as above. Since is a triangular system, it is easy to check that contains only finitely isolated points. The point projections are shown in Figure 1.

Example 2. We consider a simple case with an algebraic surface : and an algebraic curve : .
Firstly, In Step of Algorithm 2, , whereAnd Huang’s [15] algorithm outputs , whereWhile algorithm yields , compared with algorithm , algorithm returns a more laconic result by directly computing the zero sets.
Algorithm 3 returns , while Algorithm 4 returns the same variety, as shown in Figure 2. And , so the variety could not be rational parameterized. Furthermore, , so is not in the exact parametric of the loci.

Example 3. Consider the algebraic surface : , whereWe randomly pick a curve : passing over , where is a common surface in mold industry [26] and is also a popular test surface for CNC machining methods. And note that is a rational curve.
Algorithm 2 yields , whereSince are triangular systems with two elements, consisted of finite points. Furthermore, one could check that . So the exact parametric locus of orthogonal projection is . And moreover and are in , while is not in the domain of .
Algorithm 3 returns . And one can obtain by means of Algorithm 4. Compared with Algorithm 3, is a redundant branch of the projective loci. As a matter of fact, is a zero of , while is not in the domain of . The results are illustrated in Figure 3.

Example 4. Let : , whereand let : , whereNote that and are both rational.
Algorithm 2 returnswhereOne can check that is root of , which could not be vanished as denominator. () is a root of , vanishing . Andwhere are constants that do not involve .
Algorithm 3 yields , which represents the minimal variety that contains the projection loci.
And the output of Algorithm 4 is . The redundant branch is outside the domain of . Figure 4 shows the projections of the example.

More examples have been computed with a 3 GHz CPU and 2 GB memories. And the cost of time for each algorithm has been demonstrated in Table 1. And Table 2 records the number of solutions before simplified, solutions simplified via SIM and solutions simplified using Simplify. “Y” in the chart induces the fact that Algorithm 4 has redundant branches with respect to the result of Algorithm 3, and “N” for no redundant branches. “NA” means the result is not available in 3600 s or the memory reached the hardware limit. In each example, let rational curve be : and let rational surface be : ; then mean , , , and .

Table 1 illustrates that Algorithm 2 performs well in low degree case, but the time cost increases fast while the degree of surface and curve increasing; this is because the degree and the number of output regular systems in Step are getting enormous (see EX6 and EX11). Since most commonly used surfaces and curves have low degree, Algorithm 2 is valuable for engineering practice.

Algorithm 3 is significantly better than Algorithm 2 at time cost and works fine while the input degree grows.

Algorithm 4 performs in a steady and excellent way at the computation cost, but it always generates redundant branches when the inputs are rational.

Table 2 induces the fact that the algorithm could reduce the number of regular systems for the parametric loci in most circumstances. And, compared with , our algorithm has a more concise output.

6. Conclusions

In this paper, three algorithms for computing orthogonal projection of a rational curve onto rational parametric surface were presented. The method based on regular systems could compute the exact parameter loci of the projection, Algorithm computes the minimal variety that contains the parameter loci of the projection, and returns a variety passing through the parameter loci of the projection. We also developed the algorithm to simplify a series of regular systems. Preliminary examples showed that our algorithms work well and are valuable.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work was partly supported by the Chinese National Natural Science Foundation Project 11271040. Furthermore, the authors thank the anonymous reviewers for their helpful comments.