Function getPointOnAPath

Finds a point on a path. Returns an object with x, y, and the segment index if found, else null.