prototype of O'Rourke algorithm
checking for intersection of ray and segment
add selecting segment to advance with