~
>
COMPUTER AIDED GEOMETRIC DESIGN
ELSEVIER
Computer Aided Geometric Design 13 (1996) 895-904
Surface design using triangular patches H a n s H a g e n a,*, G r e g o r y N i e l s o n b, Y a s u o N a k a j i m a c a Universitiit Kaiserslautern, Fachbereich lnfi~rmatik, Erst-Schr6dinger-Strasse, 67663 Kaiserslautern, Germany b Arizona State University, Computer Science Department c Nissan Motor Co. Ltd., Japan
Received May 1994; revised February 1995
Abstract
Surfaces designed in a computer graphics environment have many applications, including the design of cars, airplanes, shipbodies and modeling robots. The generation of smooth surfaces from a set of three-dimensional data points is a key problem in the field of Computer Aided Geometric Design. An overview of fundamental triangular concepts is given and new results are presented. In M e m o r i a m J o h n G r e g o r y
1. Introduction
The methods of Computer Aided Geometric Design have arisen from the need of efficient computer representation of practical curves and surfaces used in engineering design. The choice of the surface form depends upon the application. Triangular surface patches are extremely flexible and therefore appropriate for complicated topological situations. The purpose of this paper is to give an overview focusing on the practical aspects and to present some new results. A necessary tool for the construction of triangular patches over triangular parameter domains is the concept of barycentric coordinates. Using barycentric coordinates we can define generalized Bernstein polynomials over triangles, which can be used as blending functions for triangular B6zier patches (see (Farin, 1979)). The first results of blending functions interpolation on triangles were presented by Barnhill et al. (1973), where rational interpolation functions are derived from Boolean sum combinations. To remove the incompatibility of the cross partial derivatives we * Corresponding author. 0167-8396/96/$15.00 © 1996 Elsevier Science B.V. All rights reserved SSD113167-8396(96)00014-3
896
H. Hagen et al. / Computer Aided Geometric Design 13 (1996) 895-904
can use Gregory's square (see (Barnhill, 1974; Barnhill and Gregory, 1975a)). Rational blending functions can be replaced by polynomial blending functions (see (Barnhill and Gregory, 1975b)). Convex combination schemes were introduced in geometric modeling by Gregory (1974, 1978) and generalized by Gregory and Charrot (1980) and Gregory (1983). Using convex combination schemes with rational Hermite projectors there are no twist problems. The methods mentioned above are based upon the combination of interpolation operators consisting of univariate interpolation along lines parallel to the sides of a triangle. Nielson presented a side vertex method for interpolation in triangles, where the fundamental operators consist of univariate interpolation along lines joining a vertex and its opposing side (see (Nielson, 1979)). Hagen (1986) presented a convex combination scheme for interpolation function values, derivatives and curvature values on the boundary of arbitrary triangles. This method is based upon a geometric Hermiteoperator and is a generalization of Nielson's side vertex method. These results have been generalized to triangular surface-patches with first order geometric continuity (see (Nielson, 1987)) and second order geometric continuity (see (Hagen and Pottmann, 1988)). These new surface patchtypes can be used for modeling open and closed surfaces with first and second order geometric continuity. As an application we present an algorithm for hollow surface design with G I and G 2 triangular patches.
2. Triangular Bezier patches Let T be a triangle with vertices V1, V% V3 (see Fig. 1). If P is an arbitrary point in T, then the barycentric coordinates P relative to T are (hi, b2, b3) where bl = A1/A. Al is the area of the subtriangle PV2~ and A is the area of triangle T. b2 and b3 are analogously defined. A triangular B6zier patch is defined by
X (u, w) := ~ bi,j,k Bi'ij,k (r(u, w), s(u, w), t(u, w) ) I
VI
Vs
$1 Fig. 1. Triangle T.
(1)
897
H. Hagen et al. / Computer Aided Geometric De,vign 13 (1996) 895-904
J
Fig. 2. Triangular Bdzier patch. where r, s, t are local barycentric coordinates of the triangular parameter domain and " I " denotes summation over all i,j, k >1 O, i + j + k = n,. The B~Ij,k are generalized Bernstein polynomials of degree r~ given by:
B~,.i,k(r, s, t) := i!j!~-~'k,!r'isJtk. These Bernstein polynomials have properties very much like the univariate ones. Therefore they are appropriate blending functions (see (Farin, 1979)).
3. Triangular interpolation schemes with parallel projectors The first results of blending functions interpolation on triangles were presented by Barnhill et al. (1973). To remove the incompatibility of the cross partial derivatives we use Gregory's square (see (Barnhill, 1974; Barnhill and Gregory, 1975a)). A compatibly corrected BBG-scheme is given by (see (Barnhill, 1983)):
X(u,w) := [P3 • (P3 ,~PI)]X,
(2)
where
P I X := Ho
b'~
X(JD0)+ HI
(l-b,
]-
(l-b,)
(e,)
P0 :== blV1 + (1 - bl)V2; Pl := blV1 ~- (1 - t)1)½; and Ho, H1,Ho, H1 are the cubic Hermite basis functions. P2X and P3X are analogously defined. Convex combination schemes were introduced in geometric modeling by Gregory (1974). We present a generalized version which is compatible with rectangular GordonCoons patches (see (Gregory and Charrot, 1980)). This scheme assumes that the boundary
H. Hagen et al. / Computer Aided Geometric Design 13 (1996) 895-904
898
V1
ba= O ~ (bl,l-b,,O) ~ ...............P.v / ",A
b2= 0 \ -~b,,O,l-b,)
...........................
bl 0 =
Va
Fig. 3. Triangular interpolation scheme with parallel projectors.
curves F(Si) and the ("inner") cross boundary tangencies Fn~ (Si) are specified on the three sides of the triangle T. The following interpolation functions are defined on T:
Pi(V) := F(S]) + byFn,(S]) + F(S~) + bkFnk(s~) - F(Vi) - bjFnj (Vi) - bkFnk (Vi) - bjbkF,,~,~ (Vi) where
(i,j,k) = (1,2,3), (2,3, 1) or (3, 1,2), S~=(1-bk)V~+bkVk
and
S~=(1-bj)Vi+bjVj.
The vector valued blending function interpolant is now defined by the following linear combination, or blend, of the Pi, namely 3
P(V) = E c~i(V)Pi(V)
(3)
i=l
where
c~i(V) := b~(3 - 2hi + 6bjbk). The methods mentioned above are based upon the combination of interpolation operators consisting of univariate interpolation along lines parallel to the sides of a triangle.
4. Side-vertex methods
Nielson presented a side vertex method for interpolation in triangles, where the fundamental operators consist of univariate interpolation along lines joining a vertex and its opposing side (see (Nielson, 1979)). If we denote the point opposite the vertex V/ by
H. Hagen et al. / Computer Aided Geometric Design 13 (1996) 895-904
899
V,
VK S,
Vj
R,(1) Fig. 4. Side-vertex method.
~ = - z~bi # - fl& l
Si(x,y) = \ -1--'~ ' 1---~ , •
i = 1,2,3,
the basic C°-side-vertex method takes the handy form: 3
[(1 - bi)F(Si) - biF(V~)].
A[F] = E
(4)
i=1
Nielson extended his method to include interpolation to first order derivatives on the boundaries of arbitrary triangles. Applying the Hermite operator
H[g](t) := H(t)g(1) + H(t)g'(1) + H(1 - t)g(O) + H(1 - t)g'(O) to the radial operator
Ri(t):=F(tSi+(1-t)V/);
i = 1,2,3,
we can define:
bi)F(Si) + H ( 1 - b~)R'~(1) + H(1 - bi)F(V~) - H(1 - b,)R'i(O).
D~[F] = H ( I
-
(5)
Using convex combinations, we get the interpolation operator
22 + b~B~D3[F1 D(F) := b2b3Dl[F] + b~b~D2[F] beb 2 b2b2 22 2 3 + 1 3q-bib2
(6)
Hagen's approach is based upon operators similar to Nielson's method, in that they consist of univariate interpolation along line segments joining a vertex and its opposite edge. The operator GH defined by (Y" [0, 1] --+ E 3 is a space curve):
GH(Y) := E i=O,l
H~(t)Y(i) + -Hi(t)Y'(i) + C~(t)[[Y'(i), Y"(i)], Y'(i)]
H. Hagen et al. / ComputerAided GeometricDesign 13 (1996) 895-904
900
is called geometric Hermite operator ([, ] is the cross product) with
Go(t) := Ho(t)/ZIIY'(O)tP; G, (t) := H, (t)/2tlY'(l)ll; Ho(t), H1, Ho(t), H1 (t), Ho(t), H1 (t) are the quintic Hermite basis functions. Using the Frenet frame technique (see (Hagen, 1985)) it is easy to see that
[[Y'(t),Y"(t)],Y'(t)]
:
IlY'(t)ll4. k. ~2,
where k is the curvature of the space curve Y(t) and e2 is the principal normal vector. It is a well known fact in differential geometry that we can represent the "curvature vector" k - e2 of a surface curve in the following way:
[[Y',Y"],Y'] = IlY'll4(kn - N + k 9 - I N , Y']) (kn is the normal section curvature, kg the geodesic curvature and N is the surface normal vector). Combining the geometric Hermite operator with the radial operator
Ri(t) : F(tSi + (l - t)V/);
i=
1,2,3,
and using convex combinations we get the interpolation operator: P ( F ) := b~b~P, [F] + b~b~P2[F] + b~b~-P3[F] b3b 3 3 2 33 + b3b 1 33+blb2
(7)
where
Pi[F] := Ho(1 - bi)F(V~) + H,(1 - bi)F(Si) + Ho(1 - bi)R'(O) + H , (1 - bi)R'i(1 ) + Go(1 - bi)[[R'i(O), R'i'(0)], R'~(0)] + a , (l - bi)[ [R'i(1 ), R'{ (1)], R'i(1)] and
UU<(0), <'(0)], <(0)] - IIR' (0>II4(kN(V )N(V ) +
<(0)]),
[[R'~(1 ), R'((1)], R'i(1)] : IIR'~(1)II4(kN(&)N(&) + k ~ ( & ) I N ( & ) , R'~(1)]). Using (7) as a blending function scheme the user has the opportunities to supply N, kN and kg along each side and these data are reproduced exactly. Therefore this patch fits curvature continuously in rectangular patchworks (for more details see (Hagen, 1986)).
5. Triangular patches with first and second order geometric continuity Nielson presented a G 1-surface patch, which interpolates surface normals rather than partial derivatives on the boundaries (see (Nielson, 1987)). This surface-patch scheme is based upon on the following operator:
9[Vo, V1, No, N1](t)
:= Ho(t)Vo + HI (t)V1 + aHo(t)
+flHl(t) [NI, ½ -
Vo,N~]
IN1, V1 - Vo, N1 II
[No, ½ - Vo, N1]
IIN0, V~ - Vo, N111
H. Hagen et al. / Computer Aided Geometric Design 13 (1996) 895-904
901
which has the properties: 9(i)=V,;
(d(0, Nd =0;
i=0,1.
( , ) is the scalar product and Hi(t), H i ( t ) ; i = 0, 1, are the cubic Hermite basis function; c~, fl can be used as tension parameters to modify the shape of the surface. Combining this operator with the radial operator we can define
'
1Z ~
, N[F](Vi),
Using convex combinations we get the interpolation operator: G[F] -- W1GI [F] -[- W2G2[F] -[- W3G3(F],
(8)
where 2 2 bjbk I,Vi = b~b~ + b2b~ + b2b ~ 2" ,
This interpolation scheme satisfies the interpolation conditions: G[F](OT) = F ( 0 T ) ,
N[G[FI](OT) = N [ F I ( a T ).
A common approach for discretization of such transfinite patches is to take the function values along an edge as cubic Hermite interpolants and the derivatives as linear interpolants. Linearly varying surface normals however do not work. Therefore, Nielson uses linearly varying cross-boundary derivatives (for more details see (Nielson, 1987)). This G I-patch was generalized by Hagen and Pottmann. Essential for the development of this G2-surface patch is again a geometric extension of the quintic Hermite operator. The quintic Hermite operator has the representation:
Hs[V
O,V,,V~,V(,Vo',V,"](t ) :: Hs(t)Vo ~ H~(t)t;; + H z5( t ) V o,, + H~(t)~, 7, +
+
[o, l],
with the quintic Hermite-basis functions H~(t); i = 0 . . . . . 5.1/~' and V," are now replaced by (see (Hagen and Pottmann, 1988)):
V~ = AoTo,
G" = A2Ko + >oTo,
Ao, .,kl > O,
V( = AoT1,
17(' = A2KI + plTj,
M,A~,#o,#I e R.
To, TI are the unit tangent vectors, and the "curvature vectors" K0, KI are, defined by Ko = k 0 . / ; 2 (Vo), K1 = kl . E2(VI).
The values Ai, p~, i = 0, 1, can be used like tension parameters to affect the shape of the surface. Considering these facts we can define:
902
H. Hagen et al. / ComputerAided GeometricDesign 13 (1996) 895-904
Fig. 5. Example of a "hollow surface". Base Surface
.2
/"
Outer Curve
Section Curve
Fig. 6. Topologyof a hollow surface.
g[Yo, Yl, Co, C1] (~)
:~- H5 [Vo,V~, AoTo,A1T1,Ao2Ko+ #oTo, A~KI + #~TlJ(t).
The symbol Co, C1 denote the "curvature elements" at Vo and V1, which include the corresponding surface normals No and N1. Applying this operator to the radial operator we get:
Pi[F](b,,b2, b3)= [F(V~),F (bjVj] + bkVK ), C[F] (V~), _--~
H. Hagen et aI. / Computer Aided Geometric Design 13 (1996) 895-904
903
Using convex combinations we get the interpolation operator:
P[F] = W, P1 IF] + W2P2[F] + W~P~[F],
(9)
where
bi3bk3 W ~ = bib2+ 3 3 b3b 2 33 + b3b 313" This surface patchtype is appropriate for modeling open and closed surfaces witb second order geometric continuity. The discretization of this transfinite patch is somewhat more complicated (see (Hagen and Pottmann, 1988)).
6. Applications In :most commercial CAD systems, rectangular patch schemes are used for free form modeling. This technique is very useful and provides high quality surfaces, but there are special cases which are not suitable for rectangular surface design. One case is the hollow surface, which has the same topology as the hemisphere. Our strategy to handle these situations is to "leave triangular holes" in a topological rectangular patchwork. All necessary informations for the G 1 or GZ-triangular scheme are taken from a variational design process (see (Hagen and Santarelli, 1992)) applied to the patchwork. After this step we fill in the triangles with the appropriate continuity (G l or G2).
References Bamhill, R.E. (1974), Smooth interpolation over triangles, in: R.E. Barnhill and R. Riesenfeld, eds., Computer Aided Geometric Design, Academic Press, New York, 45-70. Barnhill, R.E. (1983), Computer aided surface representation and design, in: R.E. Barnhill and W. Boehm, eds., Surfaces in CAGD, North-Holland, Amsterdam, 1-24. Barnhill, R.E., Birkhoff, G. and Gordon, W. (1973), Smooth interpolation in triangles, J. Approx. Theory 8, 114-128. Barnhill, R.E. and Gregory, J.A. (1975a), Compatible smooth interpolation in triangles, J. Approx. Theory 15, 214-225. Barnhill, R.E. and Gregory, J.A. (1975b), Polynomial interpolation to boundary data on triangles, Math. Comp. 29, 726-735. Farin, G. (1979), Supsplines fiber Dreiecken, PhD thesis, TU Braunschweig. Gregory, J. and Charrot, P. (1980), A C x-triangular interpolation patch for computer aided geometric design, Computer Graphics and Image Processing 13, 80-87. Gregory, J. (1974), Smooth interpolation without twist constraints, in: R.E. Barnhill and R. Riesenfeld, eds., Computer Aided Geometric Design, Academic Press, New York, 71-88. Gregory, J. (1978), A blending function interpolant for triangles, in: Handscomb, ed., Multivariate Approximation, Academic Press, New York, 279-287.
904
H. Hagen et al. / Computer Aided Geometric Design 13 (1996) 895-904
Gregory, J. (1983), C I rectangular and non rectangular surface patches, in: Barnhill and Boehm, eds., Surfaces in CAGD, North-Holland, Amsterdam, 25-33. Hagen, H. (1985), Geometric Spline Curves. CAGD, 223-229. Hagen, H. (1986), Geometric surface patches without twist constraints, Computer Aided Geometric Design 3, 179-184. Hagen, H. and Pottmann, H. (1988), Curvature continuous triangular interpolants, in: T. Lyche and L. Schumaker, eds., Mathematical Methods in CAGD, Academic Press, Oslo. Hagen, H. and Santarelli, R (1992), Variational design of smooth B-spline surfaces, in: H. Hagen, ed., Topics in Surface Modelling, SIAM, 85-94. Nielson, G. (1979), The side vertex method for interpolation in triangles, J. Approx. Theory 25, 318-336. Nielson, G. (1987), A transfinite, visually continuous, triangular interpolant, in: G. Farin, ed., Geometric Modeling, Applications and New Trends, SIAM, Philadelphia, 235-246.