Abstract:
A method and system for computer aided design (CAD) is disclosed for intuitive shape control of boundary patch. A boundary patch is also known as n-sided patch which is defined by a number of input curves/edges. Continuity constraints (G 0 , G 1  and G 2 ) can be specified individually for the input curves. Boundary patch is primarily used to cover a relatively flat area where other modeling operators such as loft, sweep or fillet cannot apply due to irregular shape of the area. The present invention provides a technique to directly manipulate boundary tangent magnitude of a patch and allows the user to deform the patch shape in a very intuitive way. Thus, the present invention is especially useful for industrial design applications.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates generally to computer aided design (CAD) applications and, in particular, to intuitively controlling the shape of a boundary patch. 
         [0003]    2. Description of the Related Art 
         [0004]    Computer aided design systems are traditionally used for creating and editing geometric shapes, such as car body parts or engine components. Various modeling operators have been introduced for specific modeling situations. Most noticeable standard ones include loft, sweep and fillet which are well defined over a rectangular domain. 
         [0005]    In practical design applications there are often situations to fill arbitrary regions bounded by multiple sides (typically, greater than four) where standard operators are no longer applicable. This calls for a special operator, the n-sided patch or the boundary patch. A boundary patch is defined by a set of input curves over a relatively flat area. Continuity constraints (G 0 , G 1  and G 2 ) can be specified individually for these curves. The patch to be constructed should pass through all given curves and satisfy the continuity constraints within given tolerances. 
         [0006]    It is, however, very challenging to construct a boundary patch that not only meets the boundary constraints but also possesses a fair shape under various geometric configurations. As a result, boundary patch has been a long standing problem in both design and research community and there are a large body of proposed solutions to it. 
         [0007]    In general, there are two basic approaches to the n-sided problem: multiple patches and single patch. The multiple patches solution takes an n-sided region and subdivides it into a collection of triangular or 4-sided regions. The regions are then filled with standard surface type. The main difficulty with this approach is ensuring the internal smoothness of the resulting patch network. The single patch solution attempts to create a single patch to fill in an n-sided hole. Different techniques have been developed for very specific patch situations. For example, in one technique, a quadratic function is used to fill in three- or five-sided patches. In another technique, quadratics and cubics functions are used for three-, five- and six-sided patches. The problem with these techniques is that often unusual (non-rectangular, non-planar) parametric domains are used and the lack of possibility to control internal shape of the patch. 
         [0008]    Another category of filling an n-sided hole is the subdivision approach. The basic process is to generate a surface by starting with a polygonal approximation and refine the approximation iteratively in each subdivision step. The fundamental problem with the subdivision approach, however, is the lack of a good method to handle the smoothness of extraordinary points and to create high quality surfaces. 
         [0009]    Commercial CAD systems prefer the single patch approach since only one face needs to be constructed and thus is easier to be integrated in the modeling (especially solid modeling) environment. As the rectangular scheme of non-uniform ration B-spline (NURBS) has become the de facto standard for industrial applications, NURBS is often chosen to represent n-sided patches. First, a surface with a rectangular domain is created that is large enough to cover the entire n-sided hole. The surface is then trimmed back to the hole boundary. In this sense, the patch is a trimmed NURBS surface. This kind of n-sided patch is, however, locked by the boundary constraints, i.e. there are little possibilities to determine/change its interior shape. One can insert additional interior constraints such as interior curves and points to force the patch to pass through. However, these additional constraints introduce some artifacts in the patch shape so that the patch quality (e.g. curvature flow) may suffer. Certain tension control may be achieved but its influence over the entire patch shape is somewhat subtle and limited. 
         [0010]    As the foregoing illustrates, what is needed in the art is a mechanism for modifying the patch shape in a direct and intuitive way. 
       SUMMARY OF THE INVENTION 
       [0011]    One or more embodiments of the invention is a computer-implemented method for modifying the shape of a graphics object represented in a computer-aided design (CAD) application. The method includes the steps of generating a surface based on one or more boundaries of the graphics object, wherein the surface has a shape defined by a set of first coordinates, mapping the set of first coordinates to a set of second coordinates that identifies a different tangent for each of the one or more boundary edges, modifying a first tangent for a first boundary edge, and modifying the set of second coordinates based on the modified first tangent to generate a modified shape of the surface. 
         [0012]    Advantageously, the technique described herein allows for the modification of a boundary patch by modifying tangent magnitudes along the boundaries. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0013]    So that the manner in which the above recited features of the invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments. 
           [0014]      FIG. 1  is a computing environment configured implement one or more embodiments of the invention; 
           [0015]      FIG. 2  illustrates a graphics object generated using the drawing program of  FIG. 1 , according to one embodiment of the invention; 
           [0016]      FIG. 3  illustrates the graphics object of  FIG. 2  with a surface generated based on input boundaries and uniform scaling with a scale factor of 0.3, according to one embodiment of the invention; 
           [0017]      FIG. 4  illustrates the graphics object of  FIG. 2  with a surface generated based on input boundaries and uniform scaling with a scale factor of 0.5, according to one embodiment of the invention; 
           [0018]      FIG. 5  illustrates the graphics object of  FIG. 2  with a surface generated based on input boundaries and uniform scaling with a scale factor of 0.8, according to one embodiment of the invention; 
           [0019]      FIG. 6  illustrates the graphics object of  FIG. 2  with a surface generated based on input boundaries and non-uniform scaling of boundary patch tangent magnitudes, according to one embodiment of the invention; and 
           [0020]      FIG. 7  is a flow diagram of method steps for modifying the shape of a surface of a graphics object, according to one embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0021]    In the following description, numerous specific details are set forth to provide a more thorough understanding of the invention. However, it will be apparent to one of skill in the art that the invention may be practiced without one or more of these specific details. In other instances, well-known features have not been described in order to avoid obscuring the invention. 
       Hardware Environment 
       [0022]      FIG. 1  is a computing environment configured to implement one or more embodiments of the invention. Embodiments of the invention are typically implemented using a computer  100 , which generally includes, inter alia, a display device  102 , data storage devices  104 , cursor control devices  106 , and other devices. Those skilled in the art will recognize that any combination of the above components, or any number of different components, peripherals, and other devices, may be used with the computer  100 . 
         [0023]    One or more embodiments of the invention are implemented by a computer-implemented graphics program  108  (e.g., a CAD program), wherein the graphics program  108  is represented by a window displayed on the display device  102 . Generally, the graphics program  108  comprises logic and/or data embodied in or readable from a device, media, carrier, or signal, e.g., one or more fixed and/or removable data storage devices  104  connected directly or indirectly to the computer  100 , one or more remote devices coupled to the computer  100  via a data communications device, etc. Further, the graphics/drawing program  108  may utilize a database  110  such as a spatial database. 
         [0024]    Computer  100  may also be connected to other computers  100  (e.g., a client or server computer) via network  112  comprising the Internet, LANs (local area network), WANs (wide area network), or the like. Further, database  110  may be integrated within computer  100  or may be located across network  112  on another computer  100  or accessible device. 
         [0025]    Those skilled in the art will recognize that the exemplary environment illustrated in  FIG. 1  is not intended to limit the present invention. Indeed, those skilled in the art will recognize that other alternative environments may be used without departing from the scope of the present invention. Accordingly,  FIG. 1  illustrates a CAD system that combines the traditional capabilities of CAD tools with common spatial management features. In this regard, such a solution enables the use of true geometry, precision, powerful creation and editing tools, and drawing and document production of a CAD system. Further, single or multiple users may integrate their workflow using such a system. 
         [0026]    As described above, one or more embodiments of the invention is implemented in a CAD system. The invention provides a technique for intuitively modifying the shape of a boundary patch defined by a set of input curves/edges. 
       Surface Representation 
       [0027]      FIG. 2  illustrates a graphics object  202  generated using the drawing program  108  of  FIG. 1 , according to one embodiment of the invention. To construct a surface that passes through all input curves  204  of the graphics object  202  identified by a user of the graphics program  108 , a parametrization is first defined for the surface. An obvious choice is to first create a so called best-fit plane that best fits the input curves in the least squares sense. The necessary parametrization is then obtained by projecting the curves onto the plane. Without loss of generality, such a best-fit plane can be assumed to be the X-Y plane. Importantly, any plane can be converted to the X-Y plane by affine transformations. Thus, the boundary patch can be expressed in the explicit form z=S(x, y). To achieve a fair shape the boundary patch is further designed to minimize the following smoothness function: 
         [0000]    
       
         
           
             
               
                 
                   ∫ 
                   
                     ∫ 
                     
                       
                         [ 
                         
                           
                             
                               ( 
                               
                                 
                                   
                                     ∂ 
                                     2 
                                   
                                    
                                   S 
                                 
                                 
                                   ∂ 
                                   
                                     x 
                                     2 
                                   
                                 
                               
                               ) 
                             
                             2 
                           
                           + 
                           
                             2 
                              
                             
                               
                                 ( 
                                 
                                   
                                     
                                       ∂ 
                                       2 
                                     
                                      
                                     S 
                                   
                                   
                                     
                                       ∂ 
                                       x 
                                     
                                      
                                     
                                       ∂ 
                                       y 
                                     
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                           + 
                           
                             
                               ( 
                               
                                 
                                   
                                     ∂ 
                                     2 
                                   
                                    
                                   S 
                                 
                                 
                                   ∂ 
                                   
                                     y 
                                     2 
                                   
                                 
                               
                               ) 
                             
                             2 
                           
                         
                         ] 
                       
                        
                       
                          
                         x 
                       
                        
                       
                          
                         y 
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0028]    A surface created with the above smoothness tends to distribute curvature over large regions and produces very graceful shapes. If B-spline is used to represent the boundary patch, solving the smoothness functional becomes the discrete matrix minimization problem: 
         [0000]      min[( x   T   ]Kx )  (2)
 
         [0000]    x T ={P i,j } is a vector of (m×n) control points and K defines the stiffness matrix and is given by: 
         [0000]    
       
         
           
             
               
                 
                   
                     ∫ 
                     
                       ∫ 
                       
                         
                           Φ 
                           T 
                         
                          
                         M 
                          
                         
                             
                         
                          
                         Φ 
                          
                         
                            
                           x 
                         
                          
                         
                            
                           y 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       Φ 
                       = 
                       
                         [ 
                         
                           
                             
                               
                                 Ψ 
                                 xx 
                               
                             
                           
                           
                             
                               
                                 Ψ 
                                 xy 
                               
                             
                           
                           
                             
                               
                                 Ψ 
                                 yy 
                               
                             
                           
                         
                         ] 
                       
                     
                     , 
                     
                       
 
                     
                      
                     
                       M 
                       = 
                       
                         [ 
                         
                           
                             
                               1 
                             
                             
                               
                                   
                               
                             
                             
                               
                                   
                               
                             
                           
                           
                             
                               
                                   
                               
                             
                             
                               2 
                             
                             
                               
                                   
                               
                             
                           
                           
                             
                               
                                   
                               
                             
                             
                               
                                   
                               
                             
                             
                               1 
                             
                           
                         
                         ] 
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where
 
and ψ={N i (x)N j (y)} with i=0, . . . , n, j=0, . . . , m and N i  is the B-spline basis function.
 
       Boundary Constraints 
       [0029]    Boundary constraints include G 0 , G 1  and G 2  constraints and can be written as linear equations: 
         [0000]        Ax=b   (4)
 
         [0000]    where each row of the matrix A represents a linear constraint on x and the vector b are the values of these constraints. The final equations for determining X are determined by minimizing the quadratic functional (2) subject to the constrained equation (4). 
         [0030]    Boundary constraints include G 0 , G 1  and G 2  constraints and can be written as linear equations. G 0  constraint is a position constraint that requires the surface to interpolate a specified position. Thus, b just contains the position coordinates, namely the z coordinates. G 1  constraint requires the surface to assume a specified normal vector          =(N)(x),N(y),N(z)). 
         [0031]    Let          =(1,0,S x ) and          =(0,1S y ) be the surface partial derivatives, the sufficient G 1  conditions are then given by: 
         [0000]    
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           &lt; 
                           &gt;= 
                           0 
                         
                       
                     
                     
                       
                         
                           &lt; 
                           &gt;= 
                           0 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which yields: 
         [0000]        N ( x )+ S   x   N ( z )= 0   
         [0000]        N ( y )+ S   y   N ( z )= 0   (6)
 
         [0000]    Thus, we obtain the following G 1  constraint equation: 
         [0000]    
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           
                             S 
                             x 
                           
                           = 
                           
                             - 
                             
                               
                                 N 
                                  
                                 
                                   ( 
                                   x 
                                   ) 
                                 
                               
                               
                                 N 
                                  
                                 
                                   ( 
                                   z 
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           
                             S 
                             y 
                           
                           = 
                           
                             - 
                             
                               
                                 N 
                                  
                                 
                                   ( 
                                   y 
                                   ) 
                                 
                               
                               
                                 N 
                                  
                                 
                                   ( 
                                   z 
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0032]    From the above equation we can see that both S x  and S y  are fully determined by the surface normal. As a result, there is no degree of freedom to modify them in the presence of G 1  constraint. 
         [0033]    Two surfaces are said G 2  at a touch point if their curvatures at that point agree in all directions. For regular surfaces G 2  condition holds if the curvatures of the two surfaces are the same in three independent directions. Therefore, the G 2  constrained equations can be derived in a manner similar to that of G 1 . 
       Modified Spherical Coordinate System 
       [0034]    Boundary tangents of a surface have great influence over its overall shape. If only position constraints are required, i.e. a boundary patch only needs to interpolate given boundaries, both directions and magnitudes of boundary tangents can be used to adjust the patch shape. However, if G 1  or G 2  constraints are present, boundary tangents are fully constrained. As shown in the previous section, there is no degree of freedom to modify either their directions or magnitudes in the Cartesian coordinate system. To overcome this limitation, a new coordinate system called the modified spherical coordinate system is defined as described below. 
         [0035]    Let O be the origin of the coordinate system and the reference plane is the X-Z plane. Then a point P=(x,y,z) in the Cartesian coordinate system is defined by the coordinate triple (r,u,v) in the modified spherical coordinate system as: 
         [0000]    
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           r 
                           = 
                           
                             
                               
                                 x 
                                 2 
                               
                               + 
                               
                                 y 
                                 2 
                               
                               + 
                               
                                 
                                   ( 
                                   
                                     z 
                                     + 
                                     
                                       f 
                                        
                                       
                                         ( 
                                         
                                           x 
                                           , 
                                           y 
                                         
                                         ) 
                                       
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           u 
                           = 
                           
                             sin 
                              
                             
                                 
                             
                              
                             
                               
                                 • 
                                 
                                   - 
                                   1 
                                 
                               
                                
                               
                                 ( 
                                 
                                   y 
                                   / 
                                   r 
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           v 
                           = 
                           
                             
                               tan 
                               
                                 - 
                                 1 
                               
                             
                              
                             
                               ( 
                               
                                 x 
                                 / 
                                 
                                   ( 
                                   
                                     z 
                                     + 
                                     
                                       f 
                                        
                                       
                                         ( 
                                         
                                           x 
                                           , 
                                           y 
                                         
                                         ) 
                                       
                                     
                                   
                                   ) 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
         [0036]    Similarly, r is the radius or radial distance of point P to a point O′ resulted from moving the origin O a distance of ƒ(x,y) along the positive Z-axis. u is the polar angle between the Y-axis and the line segment  O′P  and v the so-called the azimuthal angle measured from the positive Z-axis to the orthogonal projection of the line segment  O′P  on the reference plane. ƒ(x,y) is a function defined over the (x,y) domain and will be further described in the next section. Point O′ can be viewed as the origin of the new coordinate system and the modified coordinate system as a spherical coordinate system with a variable origin. 
         [0037]    From equation (8) it is trivial to derive the formulae of mapping from the modified spherical coordinate system to the Cartesian coordinate system as follows: 
         [0000]    
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           x 
                           = 
                           
                             r 
                              
                             
                                 
                             
                              
                             cos 
                              
                             
                                 
                             
                              
                             u 
                              
                             
                                 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             v 
                           
                         
                       
                     
                     
                       
                         
                           y 
                           = 
                           
                             r 
                              
                             
                                 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             u 
                           
                         
                       
                     
                     
                       
                         
                           z 
                           = 
                           
                             
                               r 
                                
                               
                                   
                               
                                
                               cos 
                                
                               
                                   
                               
                                
                               u 
                                
                               
                                   
                               
                                
                               cos 
                                
                               
                                   
                               
                                
                               v 
                             
                             - 
                             
                               f 
                                
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0000]    In the modified spherical coordinate system, the patch surface is now parametrically defined over the (u,v) domain and the smoothness functional (1) becomes: 
         [0000]    
       
         
           
             
               
                 
                   ∫ 
                   
                     ∫ 
                     
                       
                         [ 
                         
                           
                             
                               ( 
                               
                                 
                                   
                                     ∂ 
                                     2 
                                   
                                    
                                   r 
                                 
                                 
                                   ∂ 
                                   
                                     u 
                                     2 
                                   
                                 
                               
                               ) 
                             
                             2 
                           
                           + 
                           
                             2 
                              
                             
                               
                                 ( 
                                 
                                   
                                     
                                       ∂ 
                                       2 
                                     
                                      
                                     r 
                                   
                                   
                                     
                                       ∂ 
                                       u 
                                     
                                      
                                     
                                       ∂ 
                                       v 
                                     
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                           + 
                           
                             
                               ( 
                               
                                 
                                   
                                     ∂ 
                                     2 
                                   
                                    
                                   r 
                                 
                                 
                                   ∂ 
                                   
                                     v 
                                     2 
                                   
                                 
                               
                               ) 
                             
                             2 
                           
                         
                         ] 
                       
                        
                       
                          
                         u 
                       
                        
                       
                          
                         v 
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The corresponding discrete matrix form is re-written in the same way as in (3). 
         [0038]    The boundary constraints can be expressed in the modified spherical coordinate system. For G 1  constraints, first the 1 st  partial derivatives of the surface in u and v are computed: 
         [0000]    
       
         
           
             
               S 
               u 
             
              
             
               : 
             
              
             
                 
             
              
             
               { 
               
                 
                   
                     
                       
                         
                           x 
                           u 
                         
                         = 
                         
                           
                             ( 
                             
                               
                                 
                                   r 
                                   u 
                                 
                                  
                                 cos 
                                  
                                 
                                     
                                 
                                  
                                 u 
                               
                               - 
                               
                                 r 
                                  
                                 
                                     
                                 
                                  
                                 sin 
                                  
                                 
                                     
                                 
                                  
                                 u 
                               
                             
                             ) 
                           
                            
                           sin 
                            
                           
                               
                           
                            
                           v 
                         
                       
                     
                   
                   
                     
                       
                         
                           y 
                           u 
                         
                         = 
                         
                           
                             
                               r 
                               u 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             u 
                           
                           + 
                           
                             r 
                              
                             
                                 
                             
                              
                             cos 
                              
                             
                                 
                             
                              
                             u 
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           z 
                           u 
                         
                         = 
                         
                           
                             ( 
                             
                               
                                 
                                   r 
                                   u 
                                 
                                  
                                 cos 
                                  
                                 
                                     
                                 
                                  
                                 u 
                               
                               - 
                               
                                 r 
                                  
                                 
                                     
                                 
                                  
                                 
                                   sin 
                                   [ 
                                   u 
                                   ) 
                                 
                                  
                                 cos 
                                  
                                 
                                     
                                 
                                  
                                 v 
                               
                             
                             ] 
                           
                           - 
                           
                             f 
                             u 
                           
                         
                       
                     
                   
                 
                  
                 
                   
 
                 
                  
                 
                   S 
                   v 
                 
                  
                 
                   : 
                 
                  
                 
                     
                 
                  
                 
                   { 
                   
                     
                       
                         
                           
                             x 
                             v 
                           
                           = 
                           
                             ( 
                             
                               
                                 
                                   r 
                                   v 
                                 
                                  
                                 sin 
                                  
                                 
                                     
                                 
                                  
                                 v 
                               
                               + 
                               
                                 r 
                                  
                                 
                                     
                                 
                                  
                                 
                                   cos 
                                   [ 
                                   v 
                                   ) 
                                 
                                  
                                 cos 
                                  
                                 
                                     
                                 
                                  
                                 u 
                               
                             
                             ] 
                           
                         
                       
                     
                     
                       
                         
                           
                             y 
                             v 
                           
                           - 
                           
                             
                               r 
                               v 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             u 
                           
                         
                       
                     
                     
                       
                         
                           
                             z 
                             v 
                           
                           = 
                           
                             
                               
                                 ( 
                                 
                                   
                                     
                                       r 
                                       v 
                                     
                                      
                                     cos 
                                      
                                     
                                         
                                     
                                      
                                     v 
                                   
                                   - 
                                   
                                     r 
                                      
                                     
                                         
                                     
                                      
                                     sin 
                                      
                                     
                                         
                                     
                                      
                                     v 
                                   
                                 
                                 ) 
                               
                                
                               cos 
                                
                               
                                   
                               
                                
                               u 
                             
                             - 
                             
                               f 
                               v 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0039]    The 1 st  partial derivatives of ƒ(x,y) are then derived through the chain rule as: 
         [0000]    
       
         
           
               
             
               { 
               
                 
                   
                     
                       
                         f 
                         u 
                       
                       = 
                       
                         
                           
                             
                               f 
                               x 
                             
                              
                             
                               x 
                               u 
                             
                           
                           + 
                           
                             
                               f 
                               y 
                             
                              
                             
                               y 
                               u 
                             
                           
                         
                         = 
                         
                           
                             
                               r 
                               u 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     f 
                                     x 
                                   
                                    
                                   cos 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                    
                                   
                                       
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   v 
                                 
                                 + 
                                 
                                   
                                     f 
                                     y 
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             r 
                              
                             
                               ( 
                               
                                 
                                   
                                     f 
                                     y 
                                   
                                    
                                   cos 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                 
                                 - 
                                 
                                   
                                     f 
                                     x 
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                    
                                   
                                       
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   v 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
                 
                   
                     
                       
                         f 
                         v 
                       
                       = 
                       
                         
                           
                             
                               f 
                               x 
                             
                              
                             
                               x 
                               v 
                             
                           
                           + 
                           
                             
                               f 
                               y 
                             
                              
                             
                               y 
                               v 
                             
                           
                         
                         = 
                         
                           
                             
                               r 
                               v 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     f 
                                     x 
                                   
                                    
                                   cos 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                    
                                   
                                       
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   v 
                                 
                                 + 
                                 
                                   
                                     f 
                                     y 
                                   
                                    
                                   sin 
                                    
                                   
                                       
                                   
                                    
                                   u 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               rf 
                               x 
                             
                              
                             cos 
                              
                             
                                 
                             
                              
                             u 
                              
                             
                                 
                             
                              
                             cos 
                              
                             
                                 
                             
                              
                             v 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    Finally, the G 1  condition (3) is rewritten in the following equation 
         [0000]      ( r   1   u=r (sin  u  sin  vN ( x )−cos  uN ( y )+(sin  u  sin  v−ƒ   1   x  sin  u  sin  v+ƒ   1   y  cos  u ) N ( z ))/ w@r   1   v=r (−cos  u  cos  v N ( x )+cos  u  sin  vN ( z )+ƒ 1   x  cos  u  cos  vN ( z ))/ w  
 
         [0000]    where w=cos u sin vN(x)+sin uN(y)+(cos u cos v−ƒ x  cos u sin v−ƒ y  sin u)N(z). 
         [0040]    From the above equation, the surface tangent is now determined by the constraint normal           as well as the unknown function ƒ(x,y). Since the constraint normal is given, ƒ(x,y) is used to modify surface tangents which will be further described in the next section. 
       Uniform Vs. Non-Uniform Scaling 
       [0041]    To see how the function ƒ(x,y) affects the surface tangent vector, the following assumption is made ƒ(x,y)=C, where C is a constant. Based on this assumption: 
         [0000]      ƒ u =ƒ v =ƒ x =ƒ y =0  (15)
 
         [0000]    Both r u  and r v  are proportional to r. If equation (14) is inserted into the equations (11) and (12), it becomes clear that           and           are also proportional to r. r is computed by: 
         [0000]        r =√{square root over ( x   2   +v   2 +( z+C ) 2 )}  (16)
 
         [0042]    Therefore, if C increases, then the value r goes up and effectively scales up the magnitudes of surface tangents           and          . Similarly deceasing C will scale down the tangent magnitudes. Since the change of C equally affects surface tangents along the boundary, we call this kind of change the “uniform” scaling of surface tangent magnitudes, and C the scale factor. Obviously, the relative influence of C over r (consequently the surface tangents) is dependent on the dimension of r and therefore the size of the model. 
         [0043]      FIGS. 3-5  illustrate scaling with scale factors of 0.3, 0.5 and 0.8 respectively. In each of  FIGS. 3-5 , the surface  302  is the constraint surface and the surface  304 ,  402  and  504  are the boundary patches, respectively. For user convenience, the scale factor may be normalized between 0 and 1. The final surface is obtained by mapping back from the modified spherical coordinate system to the Cartesian coordinate system using (9). 
         [0044]    In practice, the user may want to use variable scale factors along the boundary to achieve the desired surface shape. This calls for the non-uniform scaling which allows the user to specify some seed scale factors on the boundary. A “scaling” curve along the boundary is then created that interpolates the seed scale factors. Finally, the scaling curve is used to fit a surface that is ƒ(x,y). The fitting is, in fact, the same procedure as described in the section “Surface Representation” where the coordinate z is replaced by the scale factor.  FIG. 6  illustrates a non-uniform scaling example. 
         [0045]      FIG. 7  is a flow diagram of method steps for modifying the shape of a surface of a graphics object, according to one embodiment of the invention. Although the method steps are described in conjunction with the systems for  FIGS. 1-6 , persons skilled in the art will understand that any system configured to perform the method steps, in any order, is within the scope of the invention. 
         [0046]    The method  700  begins at step  702 , where the graphics program  108  generates a surface of the graphics object  202  based on one or more input boundary edges identified by the user of the graphics profram  108 . The surface is represented in a Cartesian coordinate system and one or more constraints. 
         [0047]    At step  704 , the graphics program  108  maps the Cartesian coordinates representing the surface to a modified spherical coordinates. The manner in which the Cartesian coordinates are mapped to spherical coordinates is described in great detail above. At step  706 , the graphics program  108  modifies the tangent magnitudes along the input boundary in the spherical coordinate system according to one or more constraints specified by the user. 
         [0048]    At step  708 , the graphics program creates a surface in the spherical coordinate system according to the modified tangents. At step  710 , the graphics program maps the modified spherical coordinates back to Cartesian coordinates that represent the new shape of the surface. 
         [0049]    In other embodiments, the coordinates can be represented in coordinate systems other than Cartersian and the modified spherical coordinates. The computations involved with such coordinate systems would be well-known in the art. 
         [0050]    One embodiment of the invention may be implemented as a program product for use with a computer system. The program(s) of the program product define functions of the embodiments (including the methods described herein) and can be contained on a variety of computer-readable storage media. Illustrative computer-readable storage media include, but are not limited to: (i) non-writable storage media (e.g., read-only memory devices within a computer such as CD-ROM disks readable by a CD-ROM drive, flash memory, ROM chips or any type of solid-state non-volatile semiconductor memory) on which information is permanently stored; and (ii) writable storage media (e.g., floppy disks within a diskette drive or hard-disk drive or any type of solid-state random-access semiconductor memory) on which alterable information is stored. 
         [0051]    The invention has been described above with reference to specific embodiments. Persons skilled in the art, however, will understand that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The foregoing description and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.