INTERSECTRAYPOLYGON Intersection points between a ray and a polygon.

   P = intersectRayPolygon(RAY, POLY)
   Returns the intersection points of the ray RAY with polygon POLY. 
   RAY is a 1x4 array containing parametric representation of the ray
   (in the form [x0 y0 dx dy], see createRay for details). 
   POLY is a Nx2 array containing coordinate of polygon vertices
   
   P = intersectRayPolygon(RAY, POLY, TOL)
   Specifies the tolerance for geometric tests. Default is 1e-14.

   [P IND] = intersectRayPolygon(...)
   Also returns index of polygon intersected edge(s). See
   intersectLinePolygon for details.

   See also
   rays2d, polygons2d, intersectLinePolygon

Package: matgeom