ELLIPSETOPOLYGON Convert an ellipse into a series of points. P = ellipseToPolygon(ELL, N); converts ELL given as [x0 y0 a b] or [x0 y0 a b theta] into a polygon with N edges. The result P is a N-by-2 array containing the coordinates of the N vertices of the polygon. P = ellipseToPolygon(ELL); Use a default number of edges equal to 72. This results in one point for each 5 degrees. [X, Y] = ellipseToPolygon(...); Return the coordinates of vertices in two separate arrays. Example poly = ellipseToPolygon([50 50 40 30 20], 60); figure; hold on; axis equal; axis([0 100 10 90]); drawPolygon(poly, 'b'); drawPoint(poly, 'bo'); See also: ellipses2d, drawEllipse, circleToPolygon, rectToPolygon
Package: matgeom