EUROGRAPHic::i "ts;S P..J.W. tw1 H19«1 ( tJdilor) ElseviHScienettPdJJ~
B. V. (North HoflarKJ} © El11'0gr81Phics Association, 1983
47
PRINCIPAL PATCHES - A NEW CLASS OF SURFACE PATCH BASED ON DIFFERENTIAL GEOMETRY R. R. Martin Department of Computing Mathematics University College Cardiff
This paper describes a new class of surface patch for use in computational geometry, where fairness is built in at the design stage by using ideas from differential geometry . Principal patches are patches whose sides are lines of curvature, and can be created by making the boundary curves obey two conditions called the frame and position matching equations. lt is shown that surface continuity is automatically achieved when composite surfaces are fanned . Particular cases are discussed., especially Dupin's cyclide patches based on circular an:: sides. Some advantages. of Dupin's cyclides over conventional, bicubic patches are descri bed. Finally it is shown how the use of principal patches leads to a natural, geometric need for non-four-sided patches.
INTRODUCTION Surface patch methods currently in use, such as the Bezier orB- spline techniques, allow tlle creation of a wide range of sculptured surfaces for computer graphics and CAD applications. Whi l e some of the earlier problems encountered with these methods, such as the rippling of the overall surface due to difficulties in controlling twist vectors [1), have now been solved, other problems still remain. Many of these lie in the area of interrogating the surface, or extracting derived geometric information from it, such as the curve of intersection of the surface wi t h a given plane. This paper describes a new approach to creating surface patches , using differential geometry as a starting point . Several advantages of these new patches will be given later. An important requirement for any surface patch metllod is that it must be capable of producing fair surfaces. While fairness is not an exact mathematical quantity, it is usually agreed to be related to the curvature of the surface, and its rate of change. Thus, it seems reasonable to assume that if we can create patches whose curvature is specified at the initial design stage, we will be able to build the faimess into the surface automatically. (This is, in effect, turning upside down the argument somet imes used [2,3 ,4,5] which says that if we can measure the curvature of surface patches, and display it in some way, we will be able to spot defects in tlle faimes.s of the surface as irregularities in the curvature) .
By specifying the curvature at such an early stage we gain an advantage, in that in certain applications it may be possible to relate various physical properties of th·e surface directly to its curvature. For exampl e, a car windscreen will act like a lens if it is not flat, so if we know to what extent this is acceptable, we may use theorems from opti cs to place constraints on the curvatu re of the patches , which can be incorporated as the patches are being designed .
48
R.R. MARTIN
liNES OF CURVATURE Most methods currently in use create a composite surface by putting together foursided patches to obtain the overall shape~ possibly using patches with other numbers of sides in awkward regions . We wish to retain this method, while at the same time ensuring that the curvature of the surface is under control . There is quite a natural way of doing this . Standard results from differential geometry [6,7] tell us. that at all points of a surface , except for umbilics (spherical points), there are two directions in the surface which are orthogonal , and are the directions of maximum and mini:mum norma 1 curvature of the surface. These are called the principal directions, and the corresponding nonoal curvatures are called the principal nonnal curvatures. (Hence the name principal patches). If we now go across the surface, such that we are always heading 1n a principal direction, we trace out a curve ca 11 ed a lin~ of curvature. Thus there are two sets of lines of curvature on every surface, which are orthogonal~ and quite naturally divide the surface up into four-sided regions (figure 1).
Figure 1 - lines of curvature net on a surface. Note that the 1ines of curvature depend only up:On the shape of the surface, and not on the parameterisation used to describe it. let us, therefore, try to create principal patches~ or patches whose edges are lines of curvature ~ with a view to creating surfaces with controlled curvature. To do this, we must f ind what constraints to impose on the patch edges if they are to be lines of curvature on some surface . I t may well turn oot that designing surfaces based on principal patches is easi er than mi ght at f irst be thought, because the most obvious feature lines of a surface, such as l ines of mirror symmetry~ lines along ridges in the surface, and so on, are often 1i nes of curvature on the surface. FRN1E AND POSITION MATCHING
At this point, we must introduce the concept of a surface frame~ which is a triad of three orthogonal vectors associated with each point of a curve on a surface. These are 11, !z, ~which are the surface tangent in the direction of the curve, a second tan9ent to the surface orthogonal to the first, and the surface normal , respectively . They form a right handed system (figure 2).
49
PRINCIPAL PATCHES
N
Figure 2 - Surface frame. If we now consider a principal patch, as shown in figure 3,
0
Figure 3 - Principal patch. it can be seen that if we start in corner 0 there are two routes to corner P we can go along side 1 , then 4 , or along side 2, then 3. There are tW constraints which must be met, for these boundary curves to lie on a well defined surface, one of which is obvious, and the other not quite so obvious : Starting from 0 , we must reach the same final point P when we go along either of the two routes . Thi s requirement is called position matching . Starting from 0, the surface frame orientation resulting at P f rom either route around the patch e<Jges mus t be the same. This requiretnent is called f rame matching. The way in wh i ch the surface frame varies when going along a curve embedded in a surface is given by the mat r ix di fferenti al equation known as the BonnetKo·va levsky equation [8]: t
-l d
!2
ds N
=
0
k
- kg
0
- kn
g
Tg
k
n
!,
Tg
~
0
tl
(1)
R:R. MARTIN
50
kg is the geodesic curvature of the curve~ k0 is the normal curvature of the and T is its geodesic torsion.
curve~
g
The special pro·p erty which characterises a curve on a surface as being a 1 i ne of curvature is that its geodesic torsion is zero. To tell us how the surface frame changes as we go a 1ong one of the patch sides~ we need to so1ve the Sonnet- Kovalevsky equation, after setting the geodesic torsion to zero in it, to ensure that the patch sides are lines of curvature. A solution can be found [9] if we restrict the patch sides to the special case of plane curves: cos.p
!1 ~ N
where
(s)
=
sin$ sin~ . 2 - sinq, si mp 1 - s m 4> versliJ - cosq, sinrp
-
si~ cos~
COS versif.t
versw
2
1 - cos $
vers~
!,
!z
(o )
(2)
N
s is arc-length alon'9 the curve~ vers X = 1 - COS X , 2 k2 = kg + k2n ~ sinq, = kg / k , cos~ = kn/ k , . 1Jt
= t0
k { o } do
It is easy to find from (2) the other result needed, which is the position of the final point of each patch side, relative to its starti ng po i nt~ i.e. the chord vector for the side. This is given by
( 3)
where
! 1 is given by the top row of equa.tion
(2) .
Equations (2) and (3 ) now give us the things we need to know about each s ide in order to attempt to find solutions for· the frame and positi on matching equations.: the frame orientations at the end of each side of the patch, and the positions at the end of each side . PATCH EXISTENCE I have proved [9, 10] that the frame and position matching equations taken together are both necessary and sufficie.nt conditions to ensure that a "good n surface is formed with the given curves as patch edges. (These equations are equivalent to the Gauss-Mainardi-Codazzi existence equations of differential ge001etry) • The main implications of this result are that (a) there are no further condit1ons other than tho·s.e men tioned above which the boundary curves must satisfy, and (b) we can choose any kind of curve for the patch edges. (Note , however, that the latter does not guarantee that it will be simpl e to fill in the patch i nteri·or from the given boundary curves) . In practice , we are currently limited to plane curves for the patch sides, as we can only solve the Bonnet-Kovalevsky eq.u ation analytically for this case (and a couple of other cases which are not i.mportant). PATCH CONTINUITY
If we consider two adjacent patches, as i n figure
4~
R:R. MARTIN
50
kg is the geodesic curvature of the curve~ k0 is the normal curvature of the and T is its geodesic torsion.
curve~
g
The special pro·p erty which characterises a curve on a surface as being a 1 i ne of curvature is that its geodesic torsion is zero. To tell us how the surface frame changes as we go a 1ong one of the patch sides~ we need to so1ve the Sonnet- Kovalevsky equation, after setting the geodesic torsion to zero in it, to ensure that the patch sides are lines of curvature. A solution can be found [9] if we restrict the patch sides to the special case of plane curves: cos.p
!1 ~ N
where
(s)
=
sin$ sin~ . 2 - sinq, si mp 1 - s m 4> versliJ - cosq, sinrp
-
si~ cos~
COS versif.t
versw
2
1 - cos $
vers~
!,
!z
(o )
(2)
N
s is arc-length alon'9 the curve~ vers X = 1 - COS X , 2 k2 = kg + k2n ~ sinq, = kg / k , cos~ = kn/ k , . 1Jt
= t0
k { o } do
It is easy to find from (2) the other result needed, which is the position of the final point of each patch side, relative to its starti ng po i nt~ i.e. the chord vector for the side. This is given by
( 3)
where
! 1 is given by the top row of equa.tion
(2) .
Equations (2) and (3 ) now give us the things we need to know about each s ide in order to attempt to find solutions for· the frame and positi on matching equations.: the frame orientations at the end of each side of the patch, and the positions at the end of each side . PATCH EXISTENCE I have proved [9, 10] that the frame and position matching equations taken together are both necessary and sufficie.nt conditions to ensure that a "good n surface is formed with the given curves as patch edges. (These equations are equivalent to the Gauss-Mainardi-Codazzi existence equations of differential ge001etry) • The main implications of this result are that (a) there are no further condit1ons other than tho·s.e men tioned above which the boundary curves must satisfy, and (b) we can choose any kind of curve for the patch edges. (Note , however, that the latter does not guarantee that it will be simpl e to fill in the patch i nteri·or from the given boundary curves) . In practice , we are currently limited to plane curves for the patch sides, as we can only solve the Bonnet-Kovalevsky eq.u ation analytically for this case (and a couple of other cases which are not i.mportant). PATCH CONTINUITY
If we consider two adjacent patches, as i n figure
4~
52
R.R. MARTIN
Figure 5 -A cyclide
Figure 6 - A horned cycl ide.
PRINCIPAL PATCHES
53
How do we go about creating Oupin's cycl ide patches? If we take two c i rcular arcs as being given, which meet at right angles, we let these form sides 1 and 2 of the patch, and solve the frame and position matching equations to find what constrain1s are imposed on sides 3 and 4, assuming that they are also circular arcs (figure 7). The calculations are rather involved and are best carried out by using quatemions, an extension of complex numbers. The results are not particularly simpl>e [9], but te 11 us that there is just one degree of freedom 1eft with wt1 ich the· shape of the patch can be altered . This can be e i ther an advantage or a disadvantage. ~n i le it is obvious that this mig:ht be rather too restrictive in the range of patches which it is possible to create, it is l ess obvious that it may be easier for someone designing a surface to manipulate . If there are a large number of degrees of freedom which interact with one another, it may becom.e difficult for the designer to tell which one he should change for a given effect on patch shape. The practical work being carried out at Cambridge Uni versity Engineering Department will help to evaluate what range of cyclide patch shapes can be create
2
1
Figure 7 - Cyclide patch . Once the boundary of a patch has been computed in the manner described above, it is a rel atively simple matter to fill in points in the interior of the patch. It is known that the interior lines of curvature are also circles, so if the origina l patch is subdivided, and the same methods applied to the subpatches as to the whole pat ch, a boundary curve for the subpatch can be found, which is a line of curvature running across the i nterior of the original patch. Dupin•s cyclide patches have many interesting properties . The ones given in this paragraph are described in detai l i n [9]. Firstly, all four corners of the patch lie on a cyclic quadrilateral (a quadrilateral which can be i.nscribed in a circle). This may lead to useful ways of visualising how to manipulate the single degree of freedcn to a 1 ter the patch shape - as it changes , the fourth corner of the patch moves around the ci rcle wflich encloses the cyclic quadrilateral. Another property is that the offset surface to a cyclide is al so another cyclide. This will be an advantage when milling cyclides with a ball-ended cutter, which must be dr iven across the offset surface. This means that the same set of routines can be used at this stage that were used in the earlier design and drawing stages . I have also shown that Oupin•s cyclides are a special case of rational bi.quadratic surfaces, which are already in use in CAD/C~ systems such as Medusa~ produced by Cambridge Interactive Systems, and a.r e also generated by the recursive subdivision technique of producing smooth surfaces devised by Doo [12] . implemented in the Remus system produced by Shape Oata. I am grateful' to M.A. Sabin [13] for allowing me to quote several further properties of cyclide patches which he has dis.covered very recently» and rely on the last property mentioned above : Plane sections through eye 1 ide patches, although quartic curves, can be parametrised in the same way as the intersection of two cylinders, with one square root being needed in the evaluation of each point. Silhouette curves also share this property. Thirdly, the curve of intersection of two cycl ide patches can be parameterised in a way that requires
54
R.R. MARTIN
only the solution of a quartic equation at each point, even though it is an eighthorder curve. The laguerre method [14,15] should be an effective way of carrying out the solution for successive parameter values. Thus, it can be seen that cycl ide patches are IDIJCh simpler than bicubics in tenns of the computatton required for typical interrogations of the surface, giving the benefits of increased speed and robustness of the interrogation algorithms . The fact that cyclides interface directly to things defined in tenns of circles and s tra i.ght 1ines is. a 1so an advantage over current surface methods . · UMBILICS It has long been recognised that it is very diffkult to design certain shapes using only four- sided patches, and the use of pdncipal patches can give this empirical observation a finn mathematical basis . It was mentioned earlier how the lines of curvature fonn an orthogonal net over a surface . Differential georn.e try tells us that such a net breaks down at points of the surface called umbilics, or spherical points, where the normal curvature of the surface is the same in all directions . This in:rnediately tells us which regions of the surface are likely places for non-four-sided patches to be required, directly as a matter of geometrical consideration, rather than as a matter of judgement . For example, we can see that there will be no need for non-four-sided patches in regions of the surface which have princi pa 1 noma l curvatures of opposite sign, such as at the join between an aircraft wing and the fuselage. This is often quoted as requiring five-sided patches when using traditional methods; note that non-four- sided patdles will still be required, but at a different place on the fuselage . Another example, this time where umbilics obviously do occur,. is on a smooth surface of revolution at the point where it meets the axis . While· principal patches do not remove the need for non-four-sided patches, they do allow us to predict where they will be required . CONCLUSION This paper describes a new method of creating surface patches for use in computational geometry . They a.re designed with their curvature under con trol from the outset. They are shown to have several advantag-es over the usual bicubic patch methods. This paper is descriptive in character of the main ideas. behind the method, and the mathematical details have be~n left out brevity. They can be found in the author's thesis [9). Th e author wishes to thank A.W.Nutbourne of Cambridge University Engineering Department for suggesting the idea of principal patches originally, and fo·r fliJCh encouragement with this work. REFERENCES [1] A.R.Forrest, appendix 2 in P.Bezier, Numerical control: mathematics and applications (WHey, 1972 ).
[2] J'.C.Di11, Application of colour graphics to the display of surface curvature. A.C .M. Computer Graphics, 15 (1981) 153-161. [3] F.C .Munchmeyer, K- P.Beier . Designing smooth surfaces with DIHAS. Schri fterreihe Osterrei chische Computer G.e sell schaft, 4 ( 1979) 139-154. [4] F.C.Munchmeyer, G. K.H.lau, On t he iterative design of smooth surfaces, Proc. Int.Conf. on Iterative techniques in CAD, Bologna, Italy Sept 1976 (IEEE Computer Society, 1976) • [5] F.C.Munchmeyer, The Guassian curvature of Coon's biquintic patches. Advances in computer technology (Americal Society of Mechanical Engineers, l , 1980, 383-387).
PRINCIPAL PATCHES
55
[6] D. J.Struik, Differential geometry (Addison Wesley, 1950 }. [7] C.E.Weatherburn, Di fferential geometry of three dimensions (Cambridge
University Press, 1927}. [8] A.Goetz, Introduction to differential geometry (Addison Wesley, 1970) . [9] R.R.Martin, Principal patches for computational geometry. Ph .D. thesis, Cambridge University (1982}. [10] R. R.Hartin, Existence of patches bounded by lines of curvature. CUEO/F- CAHS/TR207, Cambridge University Engineering Department (1981). (11] C.Dupin, Applications de geometrie et de rnecanique (Bachelier , Paris, 1822). [12] O.W.H.Doo , A recursive subdivision algorithm for fitting quadratic surfaces to i rre