MakeCompatible

MakeCompatible makes two or more curves have the same order, number of points, and knot vectors without changing the geometric shape of any of the curves. This is done by raising the curve order and refining the knot vector as necessary. MakeCompatible takes two curves or a list of curves as parameters.

The following code fragment makes cubicCurve at the top of Figure 52 and quadraticCurve at the bottom compatible.


      TFrameBundle frameBundle( TRGBColor( 0, 0, 0 ), 5.0 );
      TGCurve quadraticCurve( TGPoint( 25, 25 ), 
                              TGPoint( 45, 100 ),
                              TGPoint( 95, 75 ) );
      
      TGCurve cubicCurve( TGPoint( 25, 125 ), 
                          TGPoint( 45, 200 ),
                          TGPoint( 95, 175 ),
                          TGPoint( 70, 150 ) );
      
      thePort.Draw( cubicCurve, frameBundle);
      thePort.Draw( quadraticCurve, frameBundle);
      
      cubicCurve.MakeCompatible( cubicCurve, quadraticCurve );
      thePort.Draw( cubicCurve, frameBundle );
      thePort.Draw( quadraticCurve, frameBundle);

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker