projection function

Find projection of a point on an object (e.g., line or segment)