Plus Curves and Surfaces - CiteSeerX

Report 2 Downloads 180 Views
TVC manuscript No. (will be inserted by the editor)

Plus Curves and Surfaces A. Ardeshir Goshtasby Computer Science and Engineering Department, Wright State University, Dayton, OH 45435, USA e-mail: [email protected]

Key words B´ezier curve – B´ezier surface – B-spline curve – rational Gaussian (RaG) surface – geometric modeling – polygon mesh Abstract The formulations for parametric curves and surfaces that are based on control points are revised to use control lines and control planes instead. Curves defined by control lines are called control-line curves or plus curves, and surfaces defined by control planes are called control-plane surfaces or plus surfaces; the plus implies that in addition to the control points, gradient vectors at the control points are used to design curves and surfaces. The new curve and surface formulations provide more flexibility than traditional formulations in geometric design. Properties of plus curves and surfaces are investigated and an application of plus surfaces in smooth parametric representation of polygon meshes is introduced. 1 Introduction Parametric curves and surfaces are the basic components of many geometric modeling systems. A shape is designed by selecting a number of control points and interactively revising their positions until the desired shape is obtained. This paper revises the formulations for parametric curves and surfaces that are based on control points to use control lines and control planes instead. The gradient vectors associated with the control lines and control planes provide additional control in shape design. Although formulations such as Hermite cubics [16] already exist that allow the use of gradient vectors in shape design, this paper introduces a systematic method Send offprint requests to: A. Ardeshir Goshtasby

2

A. A. Goshtasby

for transforming any parametric curve or surface that is defined in terms of control points to a curve or surface that uses gradient vectors in addition to the control points to design shapes. In the following sections, first the formulations for B´ezier and B-spline curves will be revised to use gradient vectors in addition to the control points. The revised B´ezier and B-spline curves will be called B´ezier+ and B-spline+ curves. Then, the formulations for B´ezier and rational Gaussian (RaG) surfaces will be revised to use gradient vectors in addition to the control points. The revised B´ezier and RaG surfaces will be called B´ezier+ and RaG+ surfaces. 2 B´ ezier and B´ ezier+ Curves A B´ezier curve of degree k is defined by [16], P(u) =

k X

Pi Bi,k (u),

(1)

i=0

where {Pi : i = 0, ..., k} is an ordered set of control points, µ ¶ k i Bi,k (u) = u (1 − u)k−i i

(2)

is the ith Bernstein polynomial of degree k, and in 2-D, Pi = [xi yi ]t , t denoting transpose. Since the polynomials are predefined, once the control points are selected, the curve becomes fixed. B´ezier curves pass through the end control points and are tangent to the end control-polygon edges. Moreover, they are affine invariant, fall inside the convex hull of the control points, and do not intersect a straight line more than their control polygons would. To obtain a B´ezier+ curve from a B´ezier curve, the control points in formula (1) are replaced with control lines: P+ (u) =

k X

Li (u)Bi,k (u),

(3)

i=0

where in 2-D,

·

¸ lxi (u) Li (u) = . ly i (u)

(4)

lxi (u) is the x-component of a parametric line that passes through (ui , xi ) and has a slope, which we denote by xui , and ui is the parameter value at which the ith blending function (Bernstein polynomial) is maximum. Therefore, lx i (u) = xui u + bi . (5)

Plus Curves and Surfaces

3

bi is determined such that the line with slope xui passes through point (ui , xi ). Therefore, bi = xi − xui ui . (6) Similarly, ly i (u) is obtained. Therefore, relation (3) becomes +

P (u) =

k X

Pi Bi,k (u) +

i=0

where

k X

(u − ui )pui Bi,k (u).

(7)

i=0

¸ · u¸ Xi xui = sPui = u =s Yiu yi ·

pui

(8)

denotes the gradient vector associated with the ith control point. s is the gradient magnitude and Pui is the gradient direction. Although a different gradient magnitude can be specified for each control point, in this paper all gradient magnitudes are set to the same value s to minimize the number of free parameters the designer has to work with. Therefore, a B´ezier+ curve is defined by: P+ (u) =

k X

Pi Bi,k (u) + s

i=0

k X

(u − ui )Pui Bi,k (u).

(9)

i=0

A B´ezier+ curve can be initially created in the same manner a B´ezier curve is created. After a sequence of control points is selected, the gradient directions are estimated from Pui =

Pi+1 − Pi−1 . ||Pi+1 − Pi−1 ||

(10)

The end gradient vectors are computed by letting P−1 = P0 , and Pk+1 = Pk . Also, it is initially assumed that s is a fixed number such as 1 and the user is allowed to interactively revise it as needed. A B´ezier curve obtained from four control points is shown in Fig. 1a. B´ezier+ curves obtained from the same set of control points and the same gradient directions but different gradient magnitudes are shown in Figs. 1b–d. When the gradient magnitude at the control points is 0, the B´ezier+ curve becomes the B´ezier curve obtained from the same control points and as the gradient magnitude is increased the B´ezier+ curve expands toward its control points.

(INSERT FIG. 1. HERE)

The gradient directions provide an easy means of revising the local shape of a curve as demonstrated in Fig. 2. To revise the local shape of a curve,

4

A. A. Goshtasby

the nearby control line is selected with the mouse and the line is rotated by a desired amount about the associating control point with the motion of the mouse or the turn of a knob. Figs. 2a–c are obtained from the same set of control points, the same gradient magnitude, and the same gradient directions at the end control points but different gradient directions at the interior control points.

(INSERT FIG. 2. HERE)

The B´ezier+ curve as defined by formula (9) consists of two terms. The first term is a regular B´ezier curve and shows the contribution of the control points on the curve. The second term shows the contribution of the gradient vectors on the curve. The gradient magnitude can be considered the relative importance of gradient vectors with respect to the control points in a created curve. When this weight is zero, gradient vectors have no effect on the created curve; therefore, the obtained curve becomes a B´ezier curve. However, as this weight is increased, the influence of the gradient vectors on the curve increases and the curve expands toward the control points. Attempts to define curves with lines have been made before. Hoschek [12] introduced the concept of dual curves, treating B´ezier control points as lines in the homogeneous coordinate system to create duals of B´ezier curves. The idea introduced here is not the same as the dual curve idea. A curve and its dual do not look alike and have very different properties. For example, an inflection point in one necessitates a cusp in the other. Curves obtained by control points and control lines as described here are very similar and have similar properties. There is similarity between control-line curves and Catmull-Rom splines [2]. In the Catmull-Rom formulation, a curve is defined by a blending of polynomials. When the polynomials are of degree 1, the Catmull-Rom formulation and the control-line formulation become similar. Although gradient magnitudes are not used in the Catmull-Rom formulation, in the proposed formulation, the gradient magnitudes of the lines may be varied to create different curves from the same set of lines. 3 Properties of B´ ezier+ Curves End-point conditions: A B´ezier+ curve interpolates its first and last control points. This is because the first term in equation (9) shows a regular B´ezier curve, and the second term becomes zero at u = 0 and u = 1. A B´ezier+ curve, in general, is not tangent to the first and last control lines. However, the curve can be made to become tangent to the first and last control lines by adjusting the gradient directions at two of the interior control

Plus Curves and Surfaces

5

points. For instance, for the curve to become tangent to the first control line, the first derivative of (9) at u = 0 is set to Pu0 and the obtained equation is solved for Pu1 . This will determine the gradient direction at the second control point in order for the curve to become tangent to the first control line. Fig. 3a shows a B´ezier+ curve where the two interior gradient directions are determined so that the curve becomes tangent to the end control lines. If in addition, the end control lines coincide with opposing gradientvector directions, a smooth closed curve will be obtained as shown in Fig. 3b. Variation-diminishing property: A B´ezier+ curve obtained from n control points will be of degree n. Therefore, a B´ezier+ curve may contain one inflection point more than the B´ezier curve obtained from the same control points. This implies that a B´ezier+ curve defined by n control points may intersect a line up to n times. Note that a B´ezier curve defined by n control points intersects a line up to n − 1 times. An example comparing B´ezier and B´ezier+ curves obtained from 3 control points is shown in Fig. 3c. If all control lines of a B´ezier+ curve fall on a line, the obtained B´ezier+ curve will also fall on the line. This is because, as described by equation (3), a B´ezier+ curve is a convex combination of its control lines.

(INSERT FIG. 3. HERE)

Affine-invariant property: B´ezier+ curves are affine invariant. This is obvious from equation (3). Transforming the control lines of a B´ezier+ curve by an affine transformation will be the same as transforming the B´ezier+ curve points by the same affine transformation. Convex-hull property: Equation (9) can also be written as: P+ (u) = (1 − u)

k X i=0

P1 i Bi,k (u) + u

k X

P2 i Bi,k (u),

(11)

i=0

where P1 i = Pi − sui Pui , i = 0, . . . , k, u P2 i = Pi + s(1 − ui )Pi , i = 0, . . . , k.

(12) (13)

Equation (11) defines a B´ezier+ curve in terms of a convex combination of two B´ezier curves with control points given in (12) and (13). Since each of the B´ezier curves defining a B´ezier+ curve provide the convex-hull property, the curve obtained from the convex combination of the two B´ezier curves will fall inside the union of the convex hulls of the two curves. The convex

6

A. A. Goshtasby

hulls of the B´ezier()+ curves of Figs. 1 and 2 are shown in Fig. 4. A B´ezier+ curve is shown by a thick white curve and the two B´ezier curves producing it are shown by thin red curves. The convex hull of a B´ezier+ curve is shown by a blue region while the convex hulls of the two B´ezier curves creating it are shown by red regions. The regions are made transparent to enable viewing of the overlapping regions.

(INSERT FIG. 4. HERE)

Degree of continuity: Since a B´ezier+ curve with n control lines is a linear combination of two B´ezier curves of order n (see equation (11)) and since the degree of continuity of a B´ezier curve of order n is n − 1, it can be concluded that the degree of continuity of a B´ezier+ curve with n control lines is also n − 1.

Each component of a B´ezier curve can be considered a weighted sum of the constants representing a component of the control points. For instance, x(u) is obtained from a weighted sum of the x-component of the control points. The x-component of ith control point, xi , can be considered line x = xi in the ux space. The x component of a B´ezier curve is, therefore, obtained from the weighted sum of lines parallel to the u axis in the ux plane. Since the slope of line x = xi is 0 and the slope of the ith blending function is also 0 at u = ui , if a slope other than 0 is required at u = ui , blending functions other than that centered at ui must be used to create it. Therefore, at u = ui , xi has no influence on the slope of the curve there. To create a desired slope at u = ui , control points other than Pi need to be moved. This makes the creation of a desired local shape by the B´ezier formulation difficult. In contrast, a component of a B´ezier+ curve, say x+ (u), is a weighted sum of lines, but the slopes of the lines are no longer 0. The user can interactively revise them, and the proposed formulation will use the provided slopes to create desired local shapes. The influence of control line Li (u) is maximum at u = ui , and its influence decreases as one moves away from ui due to the monotonically decreasing nature of B´ezier blending functions. The ability of a B´ezier+ curve to locally modify a shape using gradient directions at the control points makes it possible to create and revise a free-form shape very effectively.

Plus Curves and Surfaces

7

4 B-spline and B-spline+ Curves Given a sequence of control points {Pi : i = 0, . . . , n}, the B-spline curve of order k approximating the points is defined by [18] P(u) =

n X

Pi Ni,k (u),

(14)

i=0

where Ni,k (u) is the ith B-spline basis function of order k, recursively defined by ½ 1 ui ≤ u ≤ ui+1 Ni,1 (u) = (15) 0 otherwise and Ni,k (u) =

u − ui ui+k − u Ni,k−1 (u) + Ni+1,k−1 (u). ui+k−1 − ui ui+k − ui+1

(16)

for k > 1. ui is the ith knot of the curve. The knots of a B-spline curve are parameter coordinates at which adjacent curve segments join. A Bspline segment of order k is obtained from k consecutive control points. The support of basis function Ni,k (u) is in the interval (ui , ui+k ), and therefore, each point on a curve of order k is obtained from k control points. A control point affects only k curve segments in its vicinity. This is a nice property that enables interactive design and revision of a complex shape piece by piece. General properties of B-spline curves are: 1. Localness: Every k consecutive control points define a B-spline segment of degree k − 1. 2. Convex hull: A B-spline curve falls inside the convex hull of its control points. 3. Variation diminishing: A B-spline curve does not wiggle more than its control polygon would. 4. Linear precision: If the control points all lie on a line, the curve will also lie on the line. 5. Affine invariance: Transforming the control points of a B-spline curve by an affine transformation will transform the curve points by the same affine transformation. 6. Degree of continuity: Two adjacent curve segments of order k share k − 1 control points and join with C k−2 continuity. This implies that a closed curve of order k with C k−2 continuity will be obtained if the last k − 1 control points repeat the first k − 1 control points. A B-spline curve of order 4 obtained from 6 control points is shown in Fig. 5a. Similar to B´ezier curves, B-spline curves may fall quite far away from the control points in order to satisfy the convex-hull property. We will revise the B-spline formulation to produce curves that pass very close to their control points. The proposed revision replaces the control points with control lines. The curves obtained by the revised formulation will be called

8

A. A. Goshtasby

B-spline+ curves. A B-spline+ curve obtained from 6 control lines is shown in Fig. 5b. B-spline+ curves not only pass closer to their control points than the B-spline curves defined by the same control points, they allow modification of a curve locally by appropriately modifying the gradient vectors at the control points.

(INSERT FIG. 5. HERE)

Analogous to B´ezier+ curves, B-spline+ curves are defined by P(u) =

n X

Pi Ni,k (u) + s

i=0

n X (u − ui )Pui Ni,k (u).

(17)

i=0

When s = 0, a B-spline+ curve becomes a B-spline curve. As s is increased, the B-spline+ curve expands toward its control points. Pui is the unit gradient vector associated with the ith control point. The first term in equation (17) is a B-spline curve and shows the contribution of the control points on the curve and the second term shows the contribution of the gradient vectors on the curve. Defining P1i = Pi − sui Pui , i = 0, . . . , n, u P2i = Pi + s(1 − ui )Pi , i = 0, . . . , n,

(18) (19)

equation (17) becomes P+ (u) = (1 − u)

n X i=0

P1 i Ni,k (u) + u

n X

P2 i Ni,k (u).

(20)

i=0

This equation describes a B-spline+ curve by a linear combination of two B-spline curves. Therefore, many properties of B-spline curves carry over to B-spline+ curves. Properties of B-spline+ curves are summarized below. 1. Localness: Every k consecutive control lines define a B-spline+ curve segment of degree k. 2. Convex hull: The convex hull of the union of the control points of the two B-spline curves defining a B-spline+ curve define the convex hull of the B-spline+ curve. 3. Variation diminishing: Because a B-spline+ curve segment defined by k control points is of degree k and a B-spline curve segment defined by k control points is of degree k − 1, a B-spline+ curve segment may contain one inflection point more than a B-spline curve defined by the same control points.

Plus Curves and Surfaces

9

4. Linear precision: If all control lines in a B-spline+ curve fall on a line, the obtained curve will also fall on the line. This is because a B-spline+ curve is a convex combination of its control lines. 5. Affine invariance: Affinely transforming the control lines of a B-spline+ curve will transform the curve points by the same affine transformation. This is because the two B-spline curves that define the B-spline+ curve possess this property. 6. Dependence on gradient magnitude: When s = 0, a B-spline+ curve becomes a B-spline curve. This is because the first term in equation (17) is a B-spline curve and the second term becomes zero when s = 0. As s is increased, the curve expands toward its control points. Figs. 6a and 6b show two B-spline+ curves obtained from the same control points and the same gradient directions but different gradient magnitudes. 7. Dependence on gradient direction: The local shape of a B-spline+ curve can be modified by changing its gradient directions. Fig. 6c shows a B-spline+ curve with control points, gradient magnitude, and three of the gradient directions the same as those in Fig. 6a but reversing the gradient direction at the upper-right control point.

(INSERT FIG. 6. HERE)

8. Degree of continuity: Two adjacent B-spline+ curves of order k sharing k − 1 control lines joint with C k−2 continuity. This is because the two B-spline curves defining a B-spline+ curve have this property. To obtain a closed B-spline+ curve of order k with C k−2 continuity, it is required that the last k − 1 control lines coincide the first k − 1 control lines and the coinciding lines have opposite directions. Note that the lines are parametric and have directions. The control-line curve formulations described above were based on traditional curve formulations that use control points. For each control point in a traditional formulation a control line was used in the new formulation. In design, however, control-line curves do not have to be created in this manner. Given a control polygon that approximately shows the geometry to be created, the edges of the polygon can be taken as the control lines in the new formulation. The vertices of the polygon are the control points used in a traditional formulation. Therefore, the difference between the traditional and the new formulations can be considered the difference between curves that approximate the polygon vertices versus curves that approximate the polygon edges. To revise a curve in a traditional formulation, the vertices of the control polygon are moved to revise the polygon and consequently revise the curve. In the new formulation, the control polygon is revised by

10

A. A. Goshtasby

modifying its edges using the gradient directions, consequently revising the curve. In the preceding sections, control-line curves were defined in the context of B´ezier and B-spline formulations. Similarly, control-line curves can be defined for rational B´ezier [16], non-uniform rational B-spline (NURBS) [10], and rational Gaussian (RaG) formulations [11]. The control-line idea can be extended to surfaces also. Below, it will be shown that if the control points are replaced with control planes in the formulation of a parametric surface, the obtained surface will enable effective design of free-form shapes by modifying the control-plane gradients. This will be demonstrated in the context of B´ezier and RaG formulations, but the idea is general and can be applied to B-spline, rational B´ezier, NURBS, and other parametric surfaces that are based on control points. In formulations such as NURBS and RaG where control points have associating weights, when the control points are replaced with control lines, changing the sign of a weight at a control point has the same effect as changing the sign of the gradient vector(s) or reversing the direction of the gradient vector(s) at that control point.

5 B´ ezier and B´ ezier+ Surfaces A B´ezier surface obtained from a grid of (m + 1) × (n + 1) control points is defined by [16]: P(u, v) =

m X n X

Pij Bi,m (u)Bj,n (v),

(21)

i=0 j=0

where Bi,m is the ith Bernstein polynomial of degree m, Bj,n is the jth Bernstein polynomial of degree n, and Pij is the ijth control point. We define a B´ezier+ surface by replacing the control points with control planes: P+ (u, v) =

m X n X

Lij (u, v)Bi,m (u)Bj,n (v),

(22)

i=0 j=0

where Lij (u, v) is a parametric plane defined by Lij (u, v) = (u − uij )puij + (v − vij )pvij + lij .

(23)

lij is found such that Lij (uij , vij ) = Pij . This results in Lij (u, v) = Pij + (u − uij )puij + (v − vij )puij ,

(24)

Lij (u, v) = Pij + s(u − uij )Puij + s(v − vij )Pvij ,

(25)

or

Plus Curves and Surfaces

11

and so P+ (u, v) =

m X n X

Pij Bi,m (u)Bj,n (v) + i=0 j=0 m X n h X s (u − uij )Puij + (v − i=0 j=0

i vij )Pvij Bi,m (u)Bj,n (v). (26)

s represents the gradient magnitude for all control planes, and Puij and Pvij are the gradient directions of the ijth control plane with respect to u and v, respectively. The first term in equation (26) is a regular B´ezier surface. A B´ezier+ surface is, therefore, defined by a B´ezier surface and an adjustment to it by its control-plane gradients. Although only a single surface is obtained from a grid of control points by the B´ezier formulation, it is possible to obtain a variety of surfaces by the B´ezier+ formulation by varying the gradient vectors at the control points. To create a B´ezier+ surface from a grid of control points, initially Puij and Pvij are estimated from: Pi+1,j − Pi−1,j , ||Pi+1,j − Pi−1,j || Pi,j+1 − Pi,j−1 = . ||Pi,j+1 − Pi,j−1 ||

Puij =

(27)

Pvij

(28)

For the boundary control points, P−1,j is replaced with P0,j , Pm+1,j is replaced with Pm,j , Pi,−1 is replaced with Pi,0 , and Pi,n+1 is replaced with Pi,n in equations (27) and (28). Once the initial surface is created, the user may vary the control-plane gradients as needed to generate desired local shapes. We draw a planar segment centered at each control point and let the user to interactively change its gradients with the motion of a mouse or joystick. An example comparing B´ezier and B´ezier+ surfaces is shown in Fig. 7. The B´ezier surface obtained from a grid of 4 × 4 control points is shown in Fig. 7a. The B´ezier+ surfaces obtained from the same control points are shown in Figs. 7b–d. The control planes in Fig. 7b are those initially computed from relations (27) and (28). Fig. 7c shows the result of modifying the gradient directions at the four corners of the surface, and Fig. 7d shows the surface obtained by varying the gradient directions at the four interior control points. A variety of surface shapes can be created in this manner from a single grid of control points as opposed to the B´ezier representation, which produces a single surface from a grid of control points. To obtain surfaces similar to those shown in Figs. 7b–d by the B´ezier formulation, it is required to elevate the degree of the surface and considerably increase the number of control points of the surface. Alternatively, the surface may be subdivided into small segments, and each segment may be designed separately by a B´ezier patch.

12

A. A. Goshtasby

(INSERT FIG. 7. HERE)

6 Properties of B´ ezier+ Surfaces Properties of B´ezier+ surfaces follow those of B´ezier+ curves. As the magnitude of gradient vectors approaches zero, a B´ezier+ surface approaches the B´ezier surface defined by the same control points. As the magnitude of gradient vectors increases, the surface expands toward its control points. This makes it possible to generate a surface that passes very close to its control points. Each component of a B´ezier surface can be considered a weighted sum of planes that are parallel to the uv plane. This makes creation of a desired local gradient in a component of a B´ezier surface very difficult. Each component of a B´ezier+ surface, on the other hand, is defined by a weighted sum of planes that can have any slope, making creation of desired local shapes much easier. Analogous to B´ezier+ curves, B´ezier+ surfaces can be written as a linear combination of two B´ezier surfaces, where the control points of each B´ezier surface are defined in terms of the B´ezier+ control points and associating gradient vectors. Therefore, a B´ezier+ surface falls inside the convex hull of the control points of the two B´ezier surfaces defining it. A B´ezier+ surface passes through its four corner control points. This is because the first term in equation (26) is a regular B´ezier surface and the second them becomes zero at u = 0, v = 0; u = 0, v = 1; u = 1, v = 0; and u = 1, v = 1. A B´ezier+ surface, in general, is not tangent to its mesh edges at the four corners, but the surface can be made to become tangent to them by finding new gradient directions at four non-corner control points by solving a system of linear equations. B´ezier+ surfaces are affine invariant. That is, transforming the control planes of a B´ezier+ surface with an affine transformation will be the same as transforming the surface points by the same affine transformation. This is immediately obvious from equation (22). If all the control planes fall in a plane, the obtained B´ezier+ surface will also fall in the plane. This is because a B´ezier+ surface is a convex combination of its control planes. 7 Representing Polygon Meshes by RaG+ Surfaces Some geometric models are best described by an irregular control mesh. Triangulation of range data and simplification of the obtained mesh often results in an irregular polygon mesh. Subdivision techniques have been developed to smooth polygon meshes [1, 7,8, 14,15]. Triangle and n-sided patches have also been used to create piecewise smooth approximations to polygon meshes [3–6, 9]. In the following, it will be shown that if the polygon

Plus Curves and Surfaces

13

faces are taken as the control planes in the equation of a RaG+ surface, an efficient means of approximating a polygon mesh by a smooth parametric surface will be obtained. The smoothness parameter of the RaG+ surface can be varied to create surfaces at different levels of detail. Suppose a polygon mesh with N faces is given, Pi is the centroid of the ith face, and (ui , vi ) are the parameter coordinates at the centroid of the face, obtained by averaging the parameter coordinates at the vertices of the face. A RaG surface approximating {Pi : i = 1, . . . , N } is defined by [11]: P(u, v) =

N X

Wi Pi gi (u, v),

u, v ∈ [0, 1],

(29)

i=1

where Wi is the weight of Pi , gi (u, v) is the ith blending function defined by Gi (u, v) gi (u, v) = PN , (30) j=1 Gj (u, v) and Gi (u, v) is a 2-D Gaussian of height 1 centered at (ui , vi ): Gi (u, v) = exp{−[(u − ui )2 + (v − vi )2 ]/2σi2 }.

(31)

Note that equation (29) is defined by a single sum, implying that a regular grid of control points is not required to define a RaG surface and an irregular grid of control points is sufficient. Now, if the control points of a RaG surface are replaced with the planes defining the faces of the mesh, a surface will be obtained approximating the mesh. Letting all weights in equation (29) be 1 and replacing the control points {Pi : i = 1, . . . , N } with control planes {Li (u, v) : i = 1, . . . , N }, P+ (u, v) =

N X

Li (u, v)gi (u, v),

u, v ∈ [0, 1],

(32)

i=1

is obtained. Analogous to equation (24), control plane Li (u, v) can be defined by (33) Li (u, v) = Pi + (u − ui )pui + (v − vi )pvi . Gradient vectors pui and pvi are determined by fitting a parametric plane to the vertices of the ith face and finding the partial derivatives of the plane with respect to u and v and evaluating them at u = ui and v = vi . Doing so, the following formula is obtained for a RaG+ surface P+ (u, v) =

N X i=0

Pi gi (u, v) +

N h i X (u − ui )pui + (v − vi )pvi gi (u, v).

(34)

i=0

Note that in this formula, the magnitude and direction of gradient vectors are not separated as the objective is not to design a surface but rather to approximate a polygon mesh by a surface.

14

A. A. Goshtasby

The standard deviation of the Gaussian associated with the ith polygon face, σi , is set proportional to the radius ri of the circle enclosing the polygon in the parameter space. That is, σi = Sri . This automatically assigns wider blending functions to larger polygons and assigns narrower blending functions to smaller polygons, making contributions of the faces on the reconstructed surface proportional to their sizes. Parameter S is a global parameter that controls the degree of smoothness/detailedness of the obtained surface. As S is decreased, more details are reproduced, and as S is increased, a smoother surface is obtained. Examples of RaG+ surfaces approximating polygon meshes are shown in Fig. 8. Fig. 8a depicts a digital elevation map covering an area over the Grand Canyon. This data set is courtesy of the U.S. Geological Survey. The figure shows the triangulated elevation data in shaded form. Figs. 8b and 8c depict approximations of the mesh by RaG+ surfaces at two smoothness levels. When S is very small, the surface follows the mesh closely and reproduces the small details in data. As S is increased, the small details disappear, capturing more of the global geometry of the mesh. Fig. 8d shows the triangulated Stanford Bunny in shaded form. Approximating the mesh with a RaG+ surface at two smoothness levels, the surfaces depicted in Figs. 8e and 8f are obtained. Again, as the smoothness parameter is increased, more local details are lost, creating a smoother surface. Fig. 8g shows a polygon mesh representing a person’s knee. This data set is courtesy of Silicon Graphics, Inc. Figs. 8h and 8i show approximation of this mesh by RaG+ surfaces at two different smoothness levels. This representation allows a user to reproduce a desired amount of local details in a created shape by appropriately selecting the smoothness parameter S.

(INSERT FIG. 8. HERE)

RaG+ is a global formulation and theoretically a surface point depends on all the control planes. In practice, however, since Gaussians decay exponentially, only control planes associated with control points within a small neighborhood of (u, v) in the parameter space will be needed to compute P+ (u, v). The neighborhood size depends on parameter S and the required accuracy of the computation. Control plane Li (u, v) will have no effect on the displayed surface at distances farther than 5σi from (ui , vi ) in the parameter space when the computed surface is displayed on a monitor with discrete intensities. Only 4/10000th of all the control planes were needed to find a surface point in Figs. 8b, 8e, and 8h. To provide quick access to the control planes during computation of the surface points, the control points are initially binned in a 2-D array based on their parameter coordinates.

Plus Curves and Surfaces

15

To find the surface point at (u, v), a table look up is performed to find those control points and the associating control planes that affect the surface point with the required tolerance. Therefore, although the formulation is global, with a required computational accuracy, an algorithm can be devised to quickly select the control planes that affect a surface point and use only those control planes to calculate the surface point. Since a RaG+ surface is a parametric surface, parameter coordinates at the center of mesh faces are needed. Knowing the parameter coordinates at the vertices of a face, parameter coordinates at the center of the face can be determined. If parameter coordinates at mesh vertices are not known, they should be estimated via a parametrization method. Various methods for parametrizing mesh vertices in polygon meshes have been developed. For the most recent results as well as excellent reviews of parametrization methods, see the papers by Khodakovsky et al. [13] and Praun and Hoppe [17].

8 Summary and Conclusions New formulations for parametric curves and surfaces were presented using control lines and control planes instead of traditionally used control points. The gradient vectors provided by the control lines and control planes provide an effective means of controlling the local shape of curves and surfaces. If vertices in a control polygon or in a control polyhedron are used as control points in a traditional formulation, the obtained curve or surface will approximate the polygon or the polyhedron. If the edges of the polygon or the faces of the polyhedron are used as control lines and control planes in the new formulation, a curve or a surface will be obtained that also approximates the polygon or the polyhedron. In the new formulation, revision of a control polygon or control polyhedron is achieved by revising the gradient vectors associated with the polygon edges and polyhedron faces. The gradient vectors remain very close to the curve or surface during design and thus within the view. With the traditional curve or surface formulation some of the vertices of the control polygon or control polyhedron creating a shape may fall quite far away from the shape and outside the view, making interaction with the shape difficult. The proposed idea was demonstrated in the context of B´ezier and Bspline curves as well as B´ezier and RaG surfaces, but the idea is general and can be applied to all parametric curves and surfaces that are defined in terms of control points. An application of the new formulation in smooth parametric representation of irregular polygon meshes was also presented. If instead of the control points in the formulation of a RaG surface the control planes representing the faces of a polygon mesh are used, a surface will be obtained that smoothly approximates the mesh.

16

A. A. Goshtasby

References 1. Catmull E and Clark J (1978) Recursively generated B-spline surfaces on arbitrary topological meshes. Computer-Aided Design, 350–355 2. Catmull E and Rom R (1974) A class of local interpolating splines. In Computer Aided Geometric Design, Academic Press, Barnhill and Riesenfeld, Eds., 317–326 3. Chang LHT and Said HB (1997) A C2 triangular patch for the interpolation of functional scattered data. Computer-Aided Design 29(6):407–412 4. Chui CK and Lai M-J (2000) Filling polygonal holes using C 1 cubic triangular spline patches. Computer Aided Geometric Design 17:297–307 5. Constantini P and Manni C (1996) On a class of polynomial triangular macroelements. Journal of Computational and Applied Mathematics 73:45–64 6. Constantini P and Manni C (1999) A local shape-preserving interpolation scheme for scattered data. Computer Aided Geometric Design 16:385–405 7. Doo D and Sabin M (1978) Behavior of recursive division surfaces near extraordinary points. Computer Aided Design, 356–360 8. Dyn N, Levin D, and Gregory JA (1990) A butterfly subdivision scheme for surface interpolation with tension control. ACM Trans. Graphics 9(2):160–169 9. Farin G (1985) A modified Clough-Tocher interpolant. Computer Aided Geometric Design 2:19–27 10. Farin G (1999) NURBS: From Projective Geometry to Practical Use. A K Peters, Second Edition 11. Goshtasby A (1995) Geometric modeling using rational Gaussian curves and surfaces. Computer-Aided Design 27(5):363–375 12. Hoschek J (1983) Dual B´ezier curves and surfaces. In Surfaces in CAGD, North-Holland Publishing, R E Barnhill and W Boehm, Eds., 147–156 13. Khodakovsky A, Litke N, and Schr¨ oder P (2003) Globally smooth parametrization with low distortion. In Proceedings of SIGGRAPH 2003, ACM Press / ACM SIGGRAPH, Computer Graphics Proceedings, Annual Conference Series, ACM, 350–357 14. Kobbelt L (1996) Interpolatory subdivision on open quadrilateral nets with arbitrary topology. In Proc. Eurographics ’96, Computer Graphics Forum, 409–420 15. Loop C (1987)Smooth subdivision surfaces based on triangles. Master’s thesis, Department of Mathematics, University of Utah 16. Mortenson, M E (1997) Geometric Modeling. Wiley Computer Publishing, Second Edition 17. Praun E and Hoppe H (2003) Spherical parametrization and remeshing. In Proceedings of SIGGRAPH 2003, ACM Press / ACM SIGGRAPH, Computer Graphics Proceedings, Annual Conference Series, ACM, 340–349 18. Rogers, D F (1990) Mathematical Elements for Computer Graphics, Second Edition, McGraw-Hill

Plus Curves and Surfaces

17

A. ARDESHIR GOSHTASBY received a Bachelor of Engineering in Electronics Engineering from the University of Tokyo, Japan in 1974, a Master of Science in Computer Science from the University of Kentucky, Lexington, Kentucky in 1975, and a Doctor of Philosophy also in Computer Science from Michigan State University, East Lansing, Michigan in 1983. For about 20 years, he has been working in the areas of computer vision, geometric modeling, and computer graphics. His main interests have been in image registration, and curves and surfaces. He formulated image registration as an approximation problem and developed a parametric surface formulation, known as rational Gaussian (RaG) surfaces, where irregular grids of control points can be used to define free-form shapes. Dr. Goshtasby is currently a professor in the Department of Computer Science and Engineering, Wright State University, Dayton, Ohio.

18

A. A. Goshtasby

(a)

(b)

(c)

(d)

Fig. 1 (a) A B´ezier curve. (b)–(d) B´ezier gradient-vector magnitude.

(a)

(b) +

+

curves obtained with increasing

(c)

Fig. 2 (a)–(c) B´ezier curves obtained from the same control points, the same gradient magnitude, and the same gradient-vector directions at the end control points but different gradient-vector directions at the interior control points.

Plus Curves and Surfaces

(a)

19

(b)

(c) +

Fig. 3 Comparison of B´ezier (red) and B´ezier (green) curves. (a), (b) Both curves interpolate the first and last control points. The interior gradient-vector directions of B´ezier+ curves are determined such that the curves become tangent to the end control lines. (c) A B´ezier+ curve may contain one inflection point more than the B´ezier curve obtained from the same set of control points.

(a)

(b)

(c)

(d)

(e)

(f)

Fig. 4 (a)–(f) A B´ezier+ (white) curve is obtained from a linear combination of two B´ezier (red) curves. The convex hull (blue) of a B´ezier+ curve is obtained from the union of the convex hulls (pink) of the two B´ezier curves defining it.

20

A. A. Goshtasby

(a)

(b)

Fig. 5 (a) A B-spline curve of order 4. (b) A B-spline+ curve of order 4. The small line segments show the control lines.

(a)

(b)

(c)

Fig. 6 (a) Closed B-spline (red) and B-spline+ (green) curves. (b) Same as in (a) except for using a smaller gradient magnitude s. (c) Same as in (a) except for changing the gradient direction at the upper-right control point by 180 degrees.

Plus Curves and Surfaces

21

(a)

(b)

(c)

(d) +

Fig. 7 (a) A B´ezier surface. (b) A B´ezier surface obtained from the same control points. (c) Same as (b) except for changing gradient directions at the four corner control planes. (d) Same as (b) except for changing gradient directions at the four interior control planes.

22

A. A. Goshtasby

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

Fig. 8 (a) A digital elevation map covering an area over the Grand Canyon after triangulation and rendering in shaded form. (b), (c) RaG+ surfaces approximating the mesh at two different smoothness levels. (d) The triangulated Stanford Bunny shown in shaded form. (e), (f) Approximation of the Bunny by RaG+ surfaces at different smoothness levels. (g) A range scan of a person’s knee after polygonization and rendering in shaded form. (h), (i) Approximation of the knee polygon mesh by RaG+ surfaces at different smoothness levels.