LineEdgeIntersection | Cellzilla2D Home |
Description
Determines if a ray from a point in a given direction intersects a given line segment.
Needs["Cellzilla2D`"];
Return Value
LineEdgeIntersection[lineSegment, point, direction ] returns True if a ray starting at point in the given direction intersects the line segment and False otherwise.
lineSegment={{x1,y1}, {x2,y2}} - endpoints
point={x,y} - coordinates
direction={vx,vy} - direction vector, does not need to be normalized.
Options
Example
[ Download Example as Zipped Mathematica Notebook ]
Implementation Notes
See Also