Fast and Simple Methods For Computing Control Points

06/13/2006
by   Jean Gallier, et al.
Harvey Mudd College
0

The purpose of this paper is to present simple and fast methods for computing control points for polynomial curves and polynomial surfaces given explicitly in terms of polynomials (written as sums of monomials). We give recurrence formulae w.r.t. arbitrary affine frames. As a corollary, it is amusing that we can also give closed-form expressions in the case of the frame (r, s) for curves, and the frame ((1, 0, 0), (0, 1, 0), (0, 0, 1) for surfaces. Our methods have the same low polynomial (time and space) complexity as the other best known algorithms, and are very easy to implement.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 14

12/04/2020

Algorithms for Contractibility of Compressed Curves on 3-Manifold Boundaries

In this paper we prove that the problem of deciding contractibility of a...
02/09/2017

Bezier developable surfaces

In this paper we address the issue of designing developable surfaces wit...
03/02/2020

Tightening Curves on Surfaces Monotonically with Applications

We prove the first polynomial bound on the number of monotonic homotopy ...
04/23/2019

Dynamic evaluation of exponential polynomial curves and surfaces via basis transformation

It is shown in "SIAM J. Sci. Comput. 39 (2017):B424-B441" that free-form...
10/10/2017

Improved Complexity Bounds for Counting Points on Hyperelliptic Curves

We present a probabilistic Las Vegas algorithm for computing the local z...
05/11/2017

Distribution of degrees of freedom over structure and motion of rigid bodies

This paper is concerned with recovery of motion and structure parameters...
06/26/2019

Correlators of Polynomial Processes

A process is polynomial if its extended generator maps any polynomial to...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Polynomial curves and surfaces are used extensively in geometric modeling and computer aided geometric design (CAGD) in particular (see Ramshaw [10], Farin [3, 2], Hoschek and Lasser [7], or Piegl and Tiller [9]

). One of the main reasons why polynomial curves and surfaces are used so extensively in CAGD, is that there is a very powerful and versatile algorithm to recursively approximate a curve or a surface using repeated affine interpolation, the

de Casteljau algorithm. However, the de Casteljau algorithm applies to curves and surfaces only if they are defined in terms of control points. There are situations where a curve or a surface is defined explicitly in terms of polynomials. For example, the following polynomials define a surface known as the Enneper surface:

Thus, the problem of computing control points from polynomials (defined as sums of monomials) arises. If control points can be computed quickly from polynomials, all the tools available in CAGD for drawing curves and surfaces can be applied. This could be very useful in problems where a curve of a surface is obtained analytically in terms of polynomials or rational functions, for example, problems involving generalizations of Voronoi diagrams, or motion planning problems. When dealing which such problems, it is often necessary to decide whether curves segments or surface patches intersect or not. As is well known (for example, see [3, 2]), there are effective methods based on subdivision (exploiting the fact that a Bézier curve or surface patch is contained within the convex hull of its control points) for deciding whether Bézier curve segments or surface patches intersect. Simple and fast methods for computing control points might also be also useful to teach say, Math students, to learn computational tools for drawing interesting curves and surfaces. Now, it turns out that the problem of computing control points can be viewed as a change of polynomial basis, more specifically as a change of basis from the monomial basis to bases of Bernstein polynomials. Algorithms for performing such changes of basis have been given by Piegl and Tiller [9]. More general algorithms for performing changes of bases between progressive bases and Pólya bases are presented in Goldman and Barry [5] and Lodha and Goldman [8]. These algorithms compute certain triangles or tetrahedras whose nodes are labeled with certain multisets, and are generalizations of the de Casteljau and the de Boor algorithm. In this paper, we present alternate and more direct methods for computing control points from polynomial definitions (in monomial form) that run in the same low time complexity as the above algorithms ( for curves of degree , for rectangular surfaces of bidegree , and for triangular surfaces of total degree ). Our algorithms are not as general as those of Goldman and Barry [5] and Lodha and Goldman [8], but they are more direct and very easy to implement.

The paper is organized as follows. In section 2, we review briefly the relationship between polynomial definitions and control points. We begin with the polarization of polynomials in one or two variables, and then we show how polynomial curves and surfaces are completely determined by sets of control points. In the case of surfaces, depending on the mode of polarization, we get two kinds of surfaces, bipolynomial surfaces (or rectangular patches) and total degree surfaces (or triangular patches). Efficient methods for computing control points are given in the next three section: polynomial curves in section 3, bipolynomial surfaces in section 4, and polynomial total degree surfaces in section 5. Some examples are given in section 6.

2 Control Points

2.1 Polynomial Curves

The deep reason why polynomial curves and surfaces can be handled in terms of control points is that polynomials in one or several variables can be polarized. This means that every polynomial function arises from a unique symmetric multiaffine map. A detailed treatment of this approach can be found in Ramshaw [10], Farin [3, 2], Hoschek and Lasser [7], or Gallier [4]. We simply review what is needed to explain our algorithms.

Recall that a map is affine if

for all , and all . A map is multiaffine if it is affine in each of its arguments, and a map is symmetric if it does not depend on the order of its arguments, i.e., for all , and all permutations . We also say that a map is -symmetric if it is symmetric separately in its first arguments and in its last arguments.

Let us first treat the case of polynomials in one variable, which corresponds to the case of curves. Given a (plane) polynomial curve of degree ,

where and are polynomials of degree , it turns out that comes from a unique symmetric multiaffine map , the polar form of , such that

Furthermore, given any interval (affine frame), the map is determined by the sequence of control points

where . Using linearity, in order to polarize a polynomial of one variable , it is enough to polarize a monomial . Since there are terms in the sum

the polar form of the monomial with respect to the degree (where ) is given by

2.2 Polynomial Surfaces Polarization

Given a polynomial surface , there are two natural ways to polarize the polynomials defining .

The first way is to polarize separately in and . If is the highest degree in and is the highest degree in , we get a unique -symmetric degree multiaffine map

such that

We get what is traditionally called a tensor product surface, or as we prefer to call it, a bipolynomial surface of bidegree (or a rectangular surface patch).

The second way to polarize is to treat the variables and as a whole. This way, if is a polynomial surface such that the maximum total degree of the monomials is , we get a unique symmetric degree multiaffine map

such that

We get what is called a total degree surface (or a triangular surface patch).

Using linearity, it is clear that all we have to do is to polarize a monomial .

It is easily verified that the unique -symmetric multiaffine polar form of degree

of the monomial is given by

The denominator is the number of terms in the above sum.

It is also easily verified that the unique symmetric multiaffine polar form of degree

of the monomial is given by

The denominator is the number of terms in the above sum.

2.3 Control Points For Polynomial Surfaces

Let . Given an affine frame in the plane (where are affinely independent points), a polynomial surface of total degree specified by the symmetric multiaffine map

is completely determined by the family of points in

where .

These points are called control points, and the family is called a triangular control net.

Let and be any two affine frames for the affine line . A bipolynomial surface of bidegree specified by the -symmetric multiaffine map

is completely determined by the family of points in

where and .

These points are called control points, and the family is called a rectangular control net.

Thus, to compute control points, in principle, we need to compute the polar forms of polynomials. However, this method requires polarization, which is very expensive. In the following sections, we give recurrence formulae for computing control points efficiently. As a corollary, in the case of any affine frame or of the affine frame , it is possible to give closed-form formulae for calculating control points in terms of binomial coefficients.

3 Computing Control Points For Curves

We saw in section 2 that the polar form of a monomial with respect to the degree is

Letting , it is easily verified that we have the following recurrence equations:

The above formulae can be used to compute inductively the polar values

The computation is reminiscent of the Pascal triangle. Alternatively, we can compute directly using the recurrence formula

where . When writing computer programs implementing these recurrence equations, we observed that computing and dividing by is faster than computing directly using the above formula. This is because the second method requires more divisions.

Given , computing all the scaled polar values , where and , requires time . The naive method using polarization requires computing terms. To compute the coordinates of control points, we simply combine the . Specifically, the coordinate value of the control point contributed by the polynomial (where ) is

where is an affine frame. Given , our algorithm computes the table of values , where and , and thus, it is very cheap to compute these sums.


Remark: Given a polynomial curve of degree specified by the sequence of control points over , it is well known (see Farin [3, 2], Hoschek and Lasser [7], or Piegl and Tiller [9]) that can be expressed in terms of the Bernstein polynomials as

It is also well known that the Bernstein polynomials ,

form a basis of the vector space of polynomials of degree

. Thus, it is also possible to compute the control points of by expressing the polynomials involved in the explicit polynomial definition of in term of the basis Bernstein polynomials. Such algorithms were given by Goldman and Barry [5]. Our algorithm has the same complexity and is more direct.

It is also easy to derive closed-form formulae for any affine frame .

Theorem 3.1

If the total degree is and there are occurrences where and occurrences where , then

Proof. It can be shown by induction using the above recurrence equations.      

4 Computing Rectangular Control Nets

As we saw in section 2, the polar form of the monomial with respect to is

Letting , it is easily verified that we have the following recurrence equations:

Observe that the recurrence formula is a sort of generalization of the Pascal triangle. Alternatively, prove that can be computed directly using the recurrence formula

where and ,

where and , and

where and . As in section 3, we found that computing and dividing by is faster than computing directly.

Given , using the recurrence equations, computing all the scaled polar values

where , , , and , can be done in time . The naive method using polarization requires computing terms.

To compute the coordinates of control points, we combine the . Specifically, the coordinate value of the control point contributed by the polynomial (where and ) is

where and are affine frames. Our algorithm computes the table of values , and thus, it is very cheap to compute these sums.

When the affine frames are used, the following theorem gives closed-form formulae for the polar values with respect to the bidegree .

Theorem 4.1

If there are occurrences where , occurrences where , and all the other occurrences of and have the value , then

.

Proof. It can be shown by induction using the above recurrence equations.      

It is well known that can be expressed in terms of control points and (products of) Bernstein polynomials (see Farin [3, 2], Hoschek and Lasser [7], or Piegl and Tiller [9]). As in the case of curves, the methods of Lodha and Goldman [8] have the same complexity as ours, but our method is more direct.

5 Computing Triangular Control Nets

As we saw in section 2, the polar form of the monomial with respect to the total degree is

Letting , it is easily verified that we have the following recurrence equations:

The above formulae can be used to compute inductively the polar values

The computation consists in building a tetrahedron of values reminiscent of the Pascal triangle (but -dimensional). Alternatively, we can compute directly using the recurrence formula

where and . Again, we found that computing and dividing by is faster than computing directly.

Given , using the recurrence equations, computing all the scaled polar values

where , , and , can be done in time . The naive method using polarization requires computing terms. To compute the coordinates of control points, we simply combine the . Specifically, the coordinate value of the control point (where ) contributed by the polynomial (where ) is

where and , and are the vertices of the affine frame. Our algorithm computes the table of values , and thus, it is very cheap to compute these sums.

When the affine frame is used, the following theorem gives closed-form formulae for the polar values with respect to the total degree .

Theorem 5.1

Assume that , with occurrences of , occurrences of , and occurrences of (and no occurrences of ). Then

.

Proof. It can be shown by induction using the above recurrence equations.      

As in the previous case, it is well known that can be expressed in terms of control points and (trivariate) Bernstein polynomials (see Farin [3, 2], Hoschek and Lasser [7], or Piegl and Tiller [9]). The methods of Lodha and Goldman [8] have the same complexity as ours, but our method is more direct and very easy to implement.

6 Examples

We wrote an implementation in Mathematica of a program computing polar values for curves, using the recurrence equations of section 3. It works for an arbitrary affine frame .

As an example, consider the curve of degree given by

Using the above program, the following control polygon w.r.t. is obtained:

rcpoly =  {{0, 0, 1}, {2/5, 0, 1}, {18/25, 12/25, 10/9}, {1/2, 6/5, 4/3},
   {-14/45, 71/45, 12/7}, {-45/37, 45/37, 148/63}, {-71/45, 14/45, 24/7},
   {-6/5, -1/2, 16/3}, {-12/25, -18/25, 80/9}, {0, -2/5, 16}, {0, 0, 32}};

Note that the control points also contain weights, since there are denominators (see Ramshaw [10], Farin [3, 2], Hoschek and Lasser [7], or Gallier [4]). Here is the rational curve.

Figure 1: A rose

We also wrote an implementation in Mathematica of a program computing polar values for triangular surface patches, using the recurrence equations of section 5. This algorithm works for any affine frame .

In Hilbert and Cohn-Vossen [6] (and also do Carmo [1]), an interesting map from to is defined as

This map has the remarkable property that when restricted to the sphere , we have iff or . In other words, the inverse image of every point in consists of two antipodal points. Thus, the map induces an injective map from the projective plane onto , which is obviously continuous, and since the projective plane is compact, it is a homeomorphism. Thus, the map allows us to realize concretely the projective plane in , by choosing any parameterization of the sphere , and applying the map to it. For example, the following parametric definition specifies the entire projective plane over :

Using our algorithm, the following net of degree over the affine frame , , is obtained:

proj8net =
   {{0, 0, 0, 0, 1}, {0, 0, -1/2, 0, 1}, {0, 0, -14/15, 2/15, 15/14},
   {0, 0, -20/17, 6/17, 17/14}, {0, 0, -120/101, 60/101, 101/70},
   {0, 0, -1, 4/5, 25/14}, {0, 0, -11/16, 15/16, 16/7}, {0, 0, -1/3, 1, 3},
   {0, 0, 0, 1, 4}, {0, 0, 0, 0, 1}, {0, -1/7, -1/2, 0, 1},
   {4/45, -4/15, -14/15, 2/15, 15/14}, {4/17, -28/85, -20/17, 6/17, 17/14},
   {40/101, -32/101, -120/101, 60/101, 101/70},
   {8/15, -6/25, -1, 4/5, 25/14}, {5/8, -1/8, -11/16, 15/16, 16/7},
   {2/3, 0, -1/3, 1, 3}, {0, 0, 0, 0, 15/14}, {0, -4/15, -7/15, 0, 15/14},
   {20/121, -60/121, -105/121, 9/121, 121/105},
   {10/23, -14/23, -25/23, 9/46, 46/35},
   {240/331, -192/331, -360/331, 108/331, 331/210},
   {80/83, -36/83, -75/83, 36/83, 83/42}, {10/9, -2/9, -11/18, 1/2, 18/7},
   {0, 0, 0, 0, 17/14}, {0, -32/85, -7/17, 0, 17/14},
   {9/46, -16/23, -35/46, -1/46, 46/35},
   {27/53, -89/106, -50/53, -3/53, 53/35},
   {36/43, -100/129, -40/43, -4/43, 129/70},
   {12/11, -6/11, -25/33, -4/33, 33/14}, {0, 0, 0, 0, 101/70},
   {0, -48/101, -34/101, 0, 101/70},
   {56/331, -288/331, -204/331, -40/331, 331/210},
   {56/129, -44/43, -98/129, -40/129, 129/70},
   {16/23, -144/161, -120/161, -80/161, 23/10}, {0, 0, 0, 0, 25/14},
   {0, -14/25, -6/25, 0, 25/14}, {8/83, -84/83, -36/83, -16/83, 83/42},
   {8/33, -38/33, -6/11, -16/33, 33/14}, {0, 0, 0, 0, 16/7},
   {0, -5/8, -1/8, 0, 16/7}, {0, -10/9, -2/9, -2/9, 18/7}, {0, 0, 0, 0, 3},
   {0, -2/3, 0, 0, 3}, {0, 0, 0, 0, 4}};

Note that the control points also contain weights, since there are denominators. If we project the real projective plane onto a hyperplane in

, either from a center or parallel to a direction, we can see a “3D shadow” of the real projective plane in . For example, one of the projections is the cross-cap, whose control net is

projnet4 =
   {{0, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 2/15, 15/14}, {0, 0, 6/17, 17/14},
   {0, 0, 60/101, 101/70}, {0, 0, 4/5, 25/14}, {0, 0, 15/16, 16/7},
   {0, 0, 1, 3}, {0, 0, 1, 4}, {0, 0, 0, 1}, {0, -1/7, 0, 1},
   {4/45, -4/15, 2/15, 15/14}, {4/17, -28/85, 6/17, 17/14},
   {40/101, -32/101, 60/101, 101/70}, {8/15, -6/25, 4/5, 25/14},
   {5/8, -1/8, 15/16, 16/7}, {2/3, 0, 1, 3}, {0, 0, 0, 15/14},
   {0, -4/15, 0, 15/14}, {20/121, -60/121, 9/121, 121/105},
   {10/23, -14/23, 9/46, 46/35}, {240/331, -192/331, 108/331, 331/210},
   {80/83, -36/83, 36/83, 83/42}, {10/9, -2/9, 1/2, 18/7}, {0, 0, 0, 17/14},
   {0, -32/85, 0, 17/14}, {9/46, -16/23, -1/46, 46/35},
   {27/53, -89/106, -3/53, 53/35}, {36/43, -100/129, -4/43, 129/70},
   {12/11, -6/11, -4/33, 33/14}, {0, 0, 0, 101/70}, {0, -48/101, 0, 101/70},
   {56/331, -288/331, -40/331, 331/210}, {56/129, -44/43, -40/129, 129/70},
   {16/23, -144/161, -80/161, 23/10}, {0, 0, 0, 25/14},
   {0, -14/25, 0, 25/14}, {8/83, -84/83, -16/83, 83/42},
   {8/33, -38/33, -16/33, 33/14}, {0, 0, 0, 16/7}, {0, -5/8, 0, 16/7},
   {0, -10/9, -2/9, 18/7}, {0, 0, 0, 3}, {0, -2/3, 0, 3}, {0, 0, 0, 4}}

The cross-cap is shown below.

Figure 2: The cross-cap surface

Acknowledgement. I wish to thank Deepak Tolani for very helpful comments, in particular on the use of Bernstein polynomials.

References

  • [1] Manfredo P. do Carmo. Differential Geometry of Curves and Surfaces. Prentice Hall, 1976.
  • [2] Gerald Farin. NURB Curves and Surfaces, from Projective Geometry to practical use. AK Peters, first edition, 1995.
  • [3] Gerald Farin. Curves and Surfaces for CAGD. Academic Press, fourth edition, 1998.
  • [4] Jean H. Gallier. Curves and Surfaces In Geometric Modeling: Theory And Algorithms. Morgan Kaufmann, first edition, 1999.
  • [5] Ronald Goldman and P.J. Barry. Wonderful triangle: a simple, unified, algorithmic approach to change of basis procedures in computer aided geometric design. In T. Lyche and L.L Schumaker, editors, Mathematical Methods in CAGD II, pages 297–320. Academic Press, 1992.
  • [6] D. Hilbert and S. Cohn-Vossen. Geometry and the Imagination. Chelsea Publishing Co., 1952.
  • [7] J. Hoschek and D. Lasser. Computer Aided Geometric Design. AK Peters, first edition, 1993.
  • [8] S.K. Lodha and Ronald Goldman. Change of basis algorithms for surfaces in CAGD. Computer Aided Geometric Design, 12:801–824, 1995.
  • [9] Les Piegl and Wayne Tiller. The NURBS Book. Monograph in Visual Communications. Springer Verlag, first edition, 1995.
  • [10] Lyle Ramshaw. Blossoming: A connect-the-dots approach to splines. Technical report, Digital SRC, Palo Alto, CA 94301, 1987. Report No. 19.