RECTTOPOLYGON Convert a rectangle into a polygon (set of vertices).

   POLY = rectToPolygon(RECT);
   Converts rectangle given as [X0 Y0 W H] or [X0 Y0 W H THETA] into a
   4-by-2 array double, containing coordinate of rectangle vertices.
   X0 and Y0 are the coordinates of the "lower left" vertex (before
   applying rotation), W and H are the width and the height of the
   rectangle, and THETA is the rotation angle around the first vertex, in
   degrees.

   See also:
   orientedBoxToPolygon, ellipseToPolygon, drawRect, drawPolygon


Package: matgeom