CUBICBEZIERTOPOLYLINE Compute equivalent polyline from bezier curve control.

   POLY = cubicBezierToPolyline(POINTS, N)
   Creates a polyline with N edges from the coordinates of the 4 control
   points stored in POINTS. 
   POINTS is either a 4-by-2 array (vertical concatenation of point
   coordinates), or a 1-by-8 array (horizontal concatenation of point
   coordinates). 
   The result is a (N-1)-by-2 array.

   POLY = cubicBezierToPolyline(POINTS)
   Assumes N = 64 edges as default.

   [X Y] = cubicBezierToPolyline(...)
   Returns the result in two separate arrays for X and Y coordinates.


   Example
     poly = cubicBezierToPolyline([0 0;5 10;10 5;10 0], 100);
     drawPolyline(poly, 'linewidth', 2, 'color', 'g');

   See also
     drawBezierCurve, drawPolyline


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2011-10-06,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2011 INRA - Cepia Software Platform.

Package: matgeom