code: def compute_implicit_line(nodes):
      
      delta = nodes[:, -1] - nodes[:, 0]
      length = np.linalg.norm(delta, ord=2)
      # Normalize and rotate 90 degrees to the "left".
      coeff_a = -delta[1] / length
      coeff_b = delta[0] / length
      # c = - ax - by = (delta[1] x - delta[0] y) / L
      # NOTE: We divide by ``length`` at the end to "put off" rounding.
      coeff_c = (delta[1] * nodes[0, 0] - delta[0] * nodes[1, 0]) / length
      return coeff_a, coeff_b, coeff_c
docs: Compute the implicit form of the line connecting curve endpoints.
  
      .. note::
  
         This assumes, but does not check, that the first and last nodes
         in ``nodes`` are different.
  
      Computes :math:`a, b` and :math:`c` in the normalized implicit equation
      for the line
  
      .. math::
  
         ax + by + c = 0
  
      where :math:`a^2 + b^2 = 1` (only unique up to sign).
  
      Args:
          nodes (numpy.ndarray): ``2 x N`` array of nodes in a curve.
              The line will be (directed) from the first to last
              node in ``nodes``.
  
      Returns:
          Tuple[float, float, float]: The triple of
  
          * The :math:`x` coefficient :math:`a`
          * The :math:`y` coefficient :math:`b`
          * The constant :math:`c`