title: How can I get the curve using Gradient Vector Flow?
body: <p>I was trying to implement the Gradient Vector Flow to figure out the curves, but i was confused about the result, i got the vector field as a result using the formulation, and how should i get the curve rather than vector field ?
  what should i do ?</p>
  
  <pre class="lang-py prettyprint-override"><code>def gradient_vector_flow(fx, fy, iter, mu, dx=1.0, dy=1.0, verbose=True):
      # calc gradient vector flow of input gradient field fx, fy
      b = fx ** 2.0 + fy ** 2.0
      c1, c2 = b * fx, b * fy
      r = 0.25  # (17) r &lt; 1/4 required for convergence.
      dt = dx * dy / (r * mu)
      curr_u = fx
      curr_v = fy
  
      def laplacian(m):
          return (
              np.hstack([m[:, 0:1], m[:, :-1]])
              + np.hstack([m[:, 1:], m[:, -2:-1]])
              + np.vstack([m[0:1, :], m[:-1, :]])
              + np.vstack([m[1:, :], m[-2:-1, :]])
              - 4 * m
          )
  
      for i in range(iter):
          next_u = (1.0 - b * dt) * curr_u + r * laplacian(curr_u) + c1 * dt
          next_v = (1.0 - b * dt) * curr_v + r * laplacian(curr_v) + c2 * dt
          curr_u, curr_v = next_u, next_v
      return curr_u, curr_v
  </code></pre>