Cubic polynomial patches through geodesics

Cubic polynomial patches through geodesics

Computer-Aided Design 40 (2008) 56–61 www.elsevier.com/locate/cad Cubic polynomial patches through geodesics Marco Paluszny ∗,1 Universidad Nacional ...

697KB Sizes 0 Downloads 49 Views

Computer-Aided Design 40 (2008) 56–61 www.elsevier.com/locate/cad

Cubic polynomial patches through geodesics Marco Paluszny ∗,1 Universidad Nacional de Colombia, Departamento de Matem´aticas, A.A. 3840, Sede Medell´ın, Calle 59A, Nro. 63-20, Medell´ın, Colombia Received 21 September 2006; accepted 23 August 2007

Abstract We consider patches that contain any given 3D polynomial curve as a pregeodesic (i.e. geodesic up to reparametrization). A curve is a pregeodesic if and only if its rectifying plane coincides with the tangent plane to the surface, we use this fact to construct ruled cubic patches through pregeodesics and bicubic patches through pairs of pregeodesics. We also discuss the G 1 connection of (1, k) patches with abutting pregeodesics. c 2007 Elsevier Ltd. All rights reserved.

Keywords: Geodesic; Pregeodesic; Rectifying plane; Ribbon; Ruled patch

1. Preliminaries The main goal of this paper is to exhibit a simple method to create low degree and in particular cubic polynomial surface patches that contain given curves as geodesics, when reparameterized by arclength. The method is based on the observation that a curve which lies on a surface is a geodesic (up to parametrization) if and only if its tangent and acceleration vectors are coplanar with the surface normal along the curve. This observation rephrases the statement of O’Neill in his book Elementary Differential Geometry [1, p. 330]: a curve has geodesic curvature zero if and only if its tangent vector and the surface tangential component of the acceleration are collinear. The problem of finding surface patches that contain a given curve as a geodesic is considered in [2] using the Frenet frame of the curve. They write down a necessary and sufficient condition for a surface to contain a prescribed curve as a pregeodesic, but do not emphasize the case of polynomial patches. The main emphasis in applications is in the shoe industry: finding surfaces that could model the shoe piece with a prescribed girth. ∗ Tel.: +57 4 430 9323.

E-mail address: [email protected]. 1 M. Paluszny is Profesor Jubilado of Laboratorio de Computaci´on Gr´afica y Geometr´ıa Aplicada, Escuela de Matem´atica, Facultad de Ciencias, Universidad Central de Venezuela. c 2007 Elsevier Ltd. All rights reserved. 0010-4485/$ - see front matter doi:10.1016/j.cad.2007.08.006

The mathematical connection between girth and geodesics lies in the fact that the shoe piece is fabricated from an approximately flat sheet with a minimum of stretching, so it is nearly isometric to the plane, and hence geodesics correspond to straight lines. Further applications are in textile manufacturing. This is discussed in [2] and the references therein. Our construction of surface patches that contain prescribed polynomial cubic B´ezier curves draws on the necessary relationship between the rectifying plane and the surface tangent plane, avoiding arclength parametrization and the use of Frenet frames. 2. Pregeodesics on patches A parametrized curve which lies on a given patch is called a geodesic (see [3]) if its acceleration (i.e. the second derivative with respect to its parameter) is orthogonal to the surface along the curve. A nice introduction to geodesics which fits the needs of this paper is given in [4]. It follows that the tangent vector to a geodesic must have constant length, hence it is parametrized by arclength (or arclength times a constant). A curve being a geodesic depends on its shape as well as on its parametrization. While working with applications for which parametrization is not relevant, it is natural to deal with geometric conditions on the curve to be a geodesic, up to reparametrization. In [1] O’Neill uses the term pregeodesic to refer to such curves. The necessary and suffcient condition for a curve to be a pregeodesic is the coplanarity of the tangent

M. Paluszny / Computer-Aided Design 40 (2008) 56–61

57

Fig. 1. Parabolic hyperboloid patch containing a parabola as pregeodesic.

Fig. 2. Ribbon and nonruled patch through a parabola.

vector, the acceleration and the normal to the surface along the curve. It is easy to construct families of surface patches that contain a given curve as pregeodesic. For example, if x(t) is any curve in 3D, such that x0 × x00 does not vanish, then for any α and b α 6= 0 the patch

the ribbons are regular surfaces (at least near the curve x(t)), in other words that ∂∂sx × ∂∂tx does not vanish along x(t).3 It is clear from (1) that the degree of x(t) increases rapidly because of the cross-product term, even when the degrees of α(t) and b α (t) are low. Although in the case that x(t) is a B´ezier cubic the construction yields a ruled cubic patch if we choose α and b α linear. This follows from the observation that x0 (t)×x00 (t) has degree 2. Generally speaking, the property that guarantees that each of these patches contains x(t) as pregeodesic is that the tangent plane of the surface along the curve coincides with the rectifying plane of the curve. In computer-aided geometrical design, among the ruled patches, the developable patches are especially interesting. If

x(s, t) = x(t) + s{αx0 (t) + b α x0 (t) × x00 (t)}

(1)

contains the isoparametric curve x(t) = x(0, t) as pregeodesic, since the normal vector n to the patch is orthogonal to the plane generated by x0 (t)

and

αx0 (t) + b α x0 (t) × x00 (t)

along the curve, so n, x0 and x00 are coplanar, because n · (x0 (t) × x00 (t)) = 0 for each t. A simple example of surfaces that contain a given curve as pregeodesic is the family of parabolic hyperboloids obtained in (1), when x(t) is a quadratic polynomial curve. See Fig. 1. In the special case that α = 0 and b α = 1 this patch is a cylinder. More generally any B´ezier curve x(t) is a pregeodesic of the ruled patch given by expression (1) when we write α = α(t) and b α =b α (t), polynomials in t. This expression can also be derived (see [2]) using Frenet frames,2 but this technique does not emphasize the construction of polynomial patches. We refer to ruled patches as ribbons. Moreover for any arbitrary polynomial surface p(s, t) y(s, t) = x(s, t) + s 2 p(s, t) is also a polynomial patch that contains x(t) as a pregeodesic. See Fig. 2 for an example of a ruled and a nonruled patch containing a common parabola as pregeodesic, along which both patches have coincident tangent planes. We refer to ruled patches as ribbons. Under degenerate conditions a ribbon x(s, t) might fail to have a nonvanishing normal vector along x(t). In this case x(s, t) will not be a regular surface in the sense of [11]. This situation will arise if b α (t), x0 (t) or x0 (t) × x00 (t) have a zero for some t. Throughout this paper we will assume enough conditions on the curve x(t), its derivatives and b α (t) so that 2 We thank the referee for pointing this out.

α(t) =k x0 (t) k2 (x0 (t) × x00 (t)) · x000 (t) b α (t) =k x0 (t) × x00 (t) k2 the patch x(s, t) = x(t) + s(α(t)x0 (t) + b α (t)x0 (t) × x00 (t)) is developable. For the proof it is enough to check that x0 (t), v(t) = αx0 (t) + b α x0 (t) × x00 (t) and v0 (t) are coplanar. As observed in [9] developable surfaces have been widely used in engineering, design and manufacture. Also more recently [10] uses approximately developable patches to decompose meshes. Developable patches are also important in architectural design, especially in the “paper-like” design of Frank Gehry. Beyond design, the many advantages of these surfaces in constructibility, fabrication and the coherence of physical and digital representation are studied in [6]. 3. Patches through pairs of pregeodesics Given two curves x1 (t) and x2 (t) it is possible to write down a patch x(s, t) such that x(0, t) = x1 (t) and x(1, t) = x2 (t) are pregeodesics. For this it is natural to use the cubic Hermite 3 The condition for regularity is that b α (t)x0 × x00 does not vanish along the curve x(t).

58

M. Paluszny / Computer-Aided Design 40 (2008) 56–61

Fig. 3. A (3, 3) tensor product patch containing two pregeodesics.

polynomials, (see [5]). H0 (s) = (1 − s)3 + 3(1 − s)2 s, H1 (s) = (1 − s)2 s, H2 (s) = −(1 − s)s 2 , H3 (s) = 3(1 − s)s 2 + s 3 . The patch x(s, t) = H0 (s)x1 (t) + H1 (s){α1 (t)x01 (t) +b α1 (t)x01 (t) × x001 (t)} + H2 (s){α2 (t)x02 (t) +b α2 (t)x02 (t) × x002 (t)} + H3 (s)x2 (t)

contains both xi (t) since H0 (0) = 1, Hi (0) = 0 for i ≥ 1 and H3 (1) = 1, Hi (1) = 0 for i ≤ 2. And x1 (t) is a pregeodesic because both partials of x(s, t) for s = 0 are contained in the rectifying plane (generated by x01 (t) and x01 (t) × x001 (t)). For, ∂x = α1 (t)x01 (t) + b α1 x01 (t) × x001 (t) ∂s s=0 because H00 (0) = H20 (0) = H30 (0) = 0 and H10 (0) = 1. Similarly, for the tangent plane to x(s, t) along x2 (t). Fig. 3 shows a patch through two pregeodesics. As stated in the previous section we assume that x1 (t) and b α1 (t), as well as x2 (t) and b α2 (t) satisfy the necessary conditions for regularity. Another way of constructing a bicubic patch x(s, t) that contains x1 (t) and x2 (t) as pregeodesics is to consider cubic ribbons x1 (s, t) and x2 (s, t) along x1 (t) and x2 (t), respectively. These are xi (s, t) = xi (t) + s{αi (t)xi0 (t) + b αi (t)xi0 (t) × xi00 (t)} and we use their control points as the patch’s control points. Namely the control points x10 , x11 , x12 and x13 of the patch x(s, t) =

3 X

xi j Bi (s)B j (t)

i, j=0

are those of x1 (1, t), the “second curve” of the ribbon x1 (s, t). Here the Bk ’s denote the Bernstein polynomials of degree three and x00 , x01 , x02 and x03 are the control points of x1 (t). If α1 (t) = (1 − t)α01 + tα11 , αb1 (t) = (1 − t)b α01 + tb α11 then the control points x10 , x11 , x12 and x13 are x10 = x00 + 3α01 1x0 + 18b α01 1x0 × 1x1

Fig. 4. Joining (1, 3) and (3, 3) patches along a pregeodesic.

x11 = x01 + 2α01 1x1 + α11 1x0 + 6b α01 (1x0 × 1x2 ) + 6b α11 1x0 × 1x1 x12 = x02 + α01 1x2 + 2α11 1x1 + 6b α01 1x1 × 1x2 + 6b α11 1x0 × 1x2 x13 = x03 + 3α11 1x2 + 18b α11 1x1 × 1x2 where 1x0 = x01 − x00 , 1x1 = x02 − x01 , 1x2 = x03 − x02 . The control points adjacent to those of x2 (t) are determined analogously. Note that, as expected, the points x10 and x13 have to lie on the rectifying planes of x1 (t) at t = 0 and t = 1, respectively. Similarly, the control points x20 , x21 , x22 and x23 can be expressed in terms of the control points of the ribbon x2 (s, t) along x2 (t). Now it is easy to join (1, 3) and (3, 3) patches with tangent plane continuity along pregeodesics. See Fig. 4. 4. G 1 joining of pregeodesic curves In the previous section we considered G 1 joining of patches along common pregeodesics. In this section we will look at G 1 contact of ribbons along common rulings. The G 1 connection of two ribbons containing G 1 abutting pregeodesics, as illustrated in Fig. 5, might be useful in applications because it offers a wider family of G 1 patches containing G 1 curves as piecewise pregeodesics. We will establish precisely the constraints on the position of the control b associated points and the polynomials α(t), b α (t), β(t) and β(t) to each ribbon. Two ribbons x(s, t) = x(t) + s{α(t)x0 (t) + b α (t)x0 (t) × x00 (t)} b 0 (t) × y00 (t)} y(s, t) = y(t) + s{β(t)y0 (t) + β(t)y that satisfy x(0) = y(1) are connected G 1 along a common generator at this point if and only if the following three conditions are satisfied: 1. The tangent vectors x0 (0) and y0 (1) are parallel. 2. The ribbons share a common ruling segment at x(0) = y(1). 3. The tangent planes at each point of the common segment are equal for both patches. The most interesting case arises when the degree is low. We will look more closely at the case when the degree of x(t) and y(t) are k = 3, 4.

59

M. Paluszny / Computer-Aided Design 40 (2008) 56–61

Fig. 6. Labelling of control points of x(t), y(t) and their adjacent columns.

A routine calculation shows

Fig. 5. G 1 connection along a generator.

If k = 3 and α(t) = (1 − t)α0 + tα1 , β(t) = (1 − t)β0 + tβ1 ,

b α (t) = (1 − t)b α0 + tb α1 b = (1 − t)β b0 + t β b1 β(t)

then x(s, t) and y(s, t) are (1, 3) tensor products. b0 = β b1 then the ribbons x(s, t) and If k = 4, b α0 = b α1 and β y(s, t) are (1, 4) tensor products. More generally, assume that x(t) and y(t) have degree k, b are linear, as given x0 = y1 and that α(t), b α (t), β(t) and β(t) above. Moreover as stated in Section 2 we will also assume that the ribbons x(s, t) and y(s, t) are regular along the curves x(t) and y(t), respectively. The goal is to find the minimum prerequisites on their derivatives at their common point and b0 and β b1 so that the on the coefficients α0 , α1 , b α0 , b α1 , β0 , β1 , β ribbons x(s, t) and y(s, t) join G 1 along a common generator. Condition 1 says that x0 (0) and y0 (1) are parallel at x(0) = y(1) = p (see Fig. 6, for the labeling of the control points in the case that x(t) and y(t) are cubics) and Condition 2 implies the b1 y0 (1) × equality α0 x0 (0) + b α0 x0 (0) × x00 (0) = q = β1 y0 (1) + β 00 y (1). So it follows that the tangent planes of x(s, t) and y(s, t) at p coincide. Hence α0 x0 = β1 y0

b1 y0 × y00 and b α0 x0 × x00 = β

(2)

where x0 , x00 stands for x0 (0), x00 (0) and y0 , y00 for y0 (1), y00 (1), respectively. This equations will be useful to write Condition 3 in terms of the derivatives of x and y and the α’s and β’s. In fact, Condition 3 is satisfied if and only if the vectors (1 − s)(p − y L ) + s(q − y L ), (1 − s)(x F − p) + s(x F − q) and q − p are coplanar for each s (see [7]), i.e. det(q − p, (1 − s)(p − y L ) + s(q − y L ), (1 − s)(x F − p) + s(x F − q)) is the zero polynomial. So we need that the coefficients of (1 − s)2 , (1 − s)s and s 2 , namely: det(q − p, p − y L , x F − p), det(q − p, p − y L , x F − q) + det(q − p, q − y L , x F − p) and det(q − p, q − y L , x F − q), to vanish.

b1 q − p = y0 β1 + y0 × y00 β 1 p − y L = y0 k 1 q − y L = {y0 (1 + β1 − β0 ) + y00 β1 k b1 + y0 × y00 (β b1 − β b0 )} + y0 × y000 β 1 x F − p = x0 k 1 x F − q = {x0 (1 + α1 − α0 ) + x00 α0 k + x0 × x000b α0 + x0 × x00 (b α1 − b α0 )} where k is the degree of x(t) and y(t); x0 , x00 , x000 and y0 , y00 , y000 stand for x0 (0), x00 (0), x000 (0) and y0 (1), y00 (1), y000 (1), respectively. It readily follows that det(q − p, p − y L , x F − p), the coefficient of (1 − s)2 , is zero. A calculation shows that the vanishing of the coefficient of (1 − s)s means: b1b b1 α0 (y12 × y0 ) · x00 + β β α0 (y12 × y0 ) · x13 b1 β1 (y12 × y00 ) · x0 + β b2 (y12 × y13 ) · x0 = 0 +β 1

(3)

where y12 = y0 × y00 , x13 = x0 × x000 , y13 = y0 × y000 . Assume that the curves x(t) and y(t) join G 1 at x(0) = p = y(1) and that the rectifying planes coincide at this point. Since we are interested in regular ribbons (i.e. those for which the normal to the surface does not vanish along the curve) we b1 6= 0, so it follows that Eqs. (2) and (3) form a assume that β system of three linear homogeneous equations in α0 , b α0 , β1 and b β1 . Hence, in the generic case, they may be written as linear homogeneous expressions of a parameter ω. Finally, the vanishing equation of the coefficient of s 2 is b1 α0 {y12 · x13 β12b α0 + (y0 × y13 ) · x00 β1 β b1b b1 β1 α0 α0 + (y12 × y00 ) · x00 β + (y0 × y13 ) · x13 β1 β 12 13 12 00 13 b b2 α0 } + (y × y ) · x β1 β1b α0 + (y × y ) · x00 β 1

b1 (b + {y12 · x12 β12 (b α1 − b α0 ) + (y0 × y13 ) · x12 β1 β α1 − b α0 ) 0 12 00 b1 − β b0 ) + (y × y ) · x β1 α0 (β 0 12 13 b1 − β b0 ) + (y × y ) · x β1b α0 (β 12 0 00 b + (y × y ) · x β1 α0 (1 + β1 − β0 )

60

M. Paluszny / Computer-Aided Design 40 (2008) 56–61

b1b + (y12 × y0 ) · x13 β α0 (1 + β1 − β0 ) 12 00 0b + (y × y ) · x β1 β1 (1 + α1 − α0 ) b2 (1 + α1 − α0 )} = 0. + (y12 × y13 ) · x0 β 1

(4)

Note that the quadratic part of (4),4 as a polynomial in the α, b vanishes due to (3). So, substituting α0 , b b α , β and β’s α0 , β1 b1 , in terms of ω the left-hand side of (4) is a cubic and β b0 . Moreover, homogeneous polynomial of ω, α1 , b α1 , β0 and β using a symbolic computation system we check that expression (4) factors as ω2 times a linear affine expression in terms of b0 , hence we can solve for any of them in ω, α1 , b α1 , β0 and β terms of the other three and ω. Therefore the G 1 connection of the ribbons x(s, t) and y(s, t) along their common generator depends on the choice of four homogeneous parameters. These parameters can be easily adjusted because, once a choice has been made for α0 , b α0 , β1 b1 , the remaining parameters, α1 , b b0 satisfy a and β α1 , β0 and β linear equation. Fig. 5 illustrates the G 1 joining of two (1, 3) ribbons along a common generator. A salient fact in the G 1 joining of the ribbons x(s, t) and y(s, t) is that the linear homogeneous equations (2) and (3) force a proportionality relation between α0 and b α0 and also b1 . The proportionality factors depend on the between β1 and β derivatives up to degree 3 of x(t) and y(t) at p. This suggests that it is easy to extend the above procedure to join more ribbons, which will then contain a piecewise G 1 pregeodesic. For example, let z(t) be another curve such that z(1) = y(0) and suppose that its rectifying plane at this point coincides with the rectifying plane of y(t), then the ribbon z(s, t) = z(t) + s{((1 − t)γ0 + tγ1 )z0 (t) + ((1 − t)b γ0 + tb γ1 )z0 (t) × z00 (t)} will connect G 1 to y(s, t) along a common generator if b0 y0 (0) × y00 (0) = b β0 y0 (0) = γ1 z0 (1) and β γ1 z0 (1) × z00 (1), and two homogeneous equations analogous to (2) and (3) for x(s, t) and y(s, t) above, are satisfied. They are obtained by substitution of x0 , x00 , x000 by y0 (0), y00 (0), y000 (0) and of y0 , y00 , y000 by z0 (1), z00 (1), z000 (1). The new set of four equations forces proportionality b0 and also between γ1 and b relationships between β0 and β γ1 , which depend on the derivatives of y(t) and z(t) of degree up to 3 at their joint. The resulting G 1 surface which consists of three ribbons depends on four homogeneous parameters. This process can be extended to any number of ribbons. 5. Special situations When joining two ribbons: x(s, t) depending on α0 , α1 , b α0 b0 and β b1 additional constraints and b α1 and y(s, t) on β0 , β1 , β can be imposed on these parameters or on the curves x(t) and y(t) themselves — this might arise in some specific applications and would simplify the calculations. 4 The quadratic part of (4) is the sum of the quadratic monomials of the last four summands of this expression.

Fig. 7. Tangent surface patch.

Fig. 8. Binormal surface patch.

For example, as observed earlier, if k = 4 and b α0 = b α1 and b0 = β b1 , the resulting patches are (1, 4). This follows from the β following observation. If x(t) = (x1 (t), x2 (t), x3 (t)) satisfies deg(xi (t)) ≤ k for each i then the degree of each component of x(t) × x0 (t) is less or equal than 2k − 2. If b α0 = b α1 = 0 or α0 = α1 = 0 then x(s, t) = x(t) + s{((1 − t)α0 + tα1 )x0 (t) + ((1 − t)b α0 + tb α1 )x0 (t) × x00 (t)} is a tangent surface or a binormal surface patch (see [8]). Figs. 7 and 8 illustrate these cases. If the control points q, x F and y L as shown in Fig. 6 are collinear then the curves x(1, t) and y(1, t) join G 1 at q and the coefficient of s 2 vanishes. If additionally x F − p, q − p and q−y L are coplanar then necessarily x F −q, q−p and p−y L are also coplanar and hence the coefficient of (1−s)s also vanishes. Under these conditions the tangent plane at each point of the common generator is the same. Note that this is a fairly special condition on the G 1 connection of the two ribbons. Actually, even more stringent conditions could be imposed; for example, in the case k = 3, one could be tempted to demand that the piecewise pregeodesic is a C 2 B-spline, but this would force the directions of the second derivatives at the joining point to be parallel (in fact, to be equal), which further reduces the number of degrees of freedom available for shape control of the ribbons. Finally, if x(t) and y(t) lie on a plane π then their rectifying planes are orthogonal to π and it follows that the tangent planes

M. Paluszny / Computer-Aided Design 40 (2008) 56–61

61

the first semester of 2005. The author also thanks Linda Arvelo for her help with the figures. References

Fig. 9. Joining a cylinder and a G 1 piecewise pregeodesic patch.

to the ribbons along the curves x(t) and y(t) are orthogonal to π. A possibly useful application is the G 1 joining along the piecewise pregeodesic curve of a G 1 patch with a cylinder orthogonal to π. This is illustrated in Fig. 9, where the large solid dot denotes the point q. Acknowledgements The author thanks J. S´anchez-Reyes for stimulating discussions and University of Castilla La Mancha for providing financial support and a pleasant research environment during

[1] O’Neill B. Elementary differential geometry. New York: Academic Press; 1966. [2] Wang G, Tang K, Tai Ch. Parametric representation of a surface pencil with a common spatial geodesic. Computer-Aided Design 2004;36: 447–59. [3] Gray A. Modern differential geometry of curves and surfaces with MATHEMATICA. Boca Rat´on: CRC Press; 1998. [4] Sharipov RA. Cours in differential geometry. Publication of Bashkir State University; 1996. http://www.geocities.com/r-sharipov/r4-b3.htm. [5] Farin G. Curves and surfaces for CAGD. A practical guide. Boston: Academic Press; 1993. [6] Shelden D. Part 3. The generation of surface assemblies. http://ocw.mit.edu/NR/rdonlyres/Architecture/4-510Fall-2005/ 7B4654C8-188A-4893-809A-29DB3307AF52/0/sheldenthesis3.pdf. [7] DeRose T. Neccesary and sufficient conditions for tangent plane continuity of B´ezier surfaces. Computer Aided Geometric Design 1990; 7:165–79. [8] Kreyszig E. Differential geometry and Riemannian geometry. Toronto: University of Toronto Press; 1975. [9] Sun M, Fiume E. Developable surfaces for computer graphics. In: Graphics Interface’96. 1996. p. 176–85. [10] Ni X, Garland M, Hart JC. Fair Morse functions for extracting the topological structure of a surface mesh. In: International conference on computer graphics and interactive technique. ACM SIGGRAPH; 2004. p. 613–22. Also published in: ACM Transactions on Graphics 2004;613–22. [11] do Carmo M. Differential geometry of curves and surfaces. Englewood Cliffs: Prentice Hall; 1976.