implement function projectInPlane to project a sphere into a plane