code: def dist_point_line(p, l1, l2):
      '''compute the orthogonal distance between from the line that goes through
      the points l1, l2 and the point p
  
      Args:
          p, l1, l2 : iterable
          point
          indices 0, 1, 2 corresponding to cartesian coordinates
      '''
      cross_prod = np.cross(l2 - l1, p - l1)
      return np.linalg.norm(cross_prod) / np.linalg.norm(l2 - l1f dist_point_line(p, l1, l2):
      '''compute the orthogonal distance between from the line that goes through
      the points l1, l2 and the point p
  
      Args:
          p, l1, l2 : iterable
          point
          indices 0, 1, 2 corresponding to cartesian coordinates
      '''
      cross_prod = np.cross(l2 - l1, p - l1)
      return np.linalg.norm(cross_prod) / np.linalg.norm(l2 - l1)
docs: compute the orthogonal distance between from the line that goes through
      the points l1, l2 and the point p
  
      Args:
          p, l1, l2 : iterable
          point
          indices 0, 1, 2 corresponding to cartesian coordinates