args: g1, g2 - Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line.