ORIENTEDBOXTOPOLYGON Convert an oriented box to a polygon (set of vertices).

   POLY = orientedBoxToPolygon(OBOX);
   Converts the oriented box OBOX given either as [XC YC W H] or as 
   [XC YC W H THETA] into a 4-by-2 array of double, containing coordinates
   of box vertices. 
   XC and YC are center of the box. W and H are the width and the height
   (dimension in the main directions), and THETA is the orientation, in
   degrees between 0 and 360.

   Example
     OBOX = [20 10  40 20 0];
     RECT = orientedBoxToPolygon(OBOX)
     RECT =
         -20 -10 
          20 -10 
          20  10 
         -20  10 


   See also:
   polygons2d, orientedBox, drawOrientedBox, rectToPolygon

Package: matgeom