A complete construction, giving the points of intersection and segments showing which intervals fall inside the polygon.
Next, to bundle all three, Line, Ray, Segment into a single tool... {link}
_________
Tool (.ggt): [url]http://www.geogebratube.org/material/show/id/97764[/url]