[Math] How to draw integral curves

calculusdifferential-geometryintegrationnumerical methods

I'm trying to better understand vector fields and integral curves. I'm coming from computer programming background.

My vector field is defined such that at any point on plane $p(x, y)$ I can calculate corresponding vector $v(x, y)$.

This may sound very basic, but I can't find answer anywhere. Given this setup, how can I actually draw an integral curve starting at any given point?

I tried to create a simple vector field $F(x,y) = [-y, x]$. If I sample this vector field over 2d mesh, and render normalized vector at each sampled point, I get something like this:

enter image description here

Now I want to render integral curves for this field, but I don't understand how. I'm looking for a solution that doesn't necessary has access to analytical form of vector field (we can sample it, but we don't know its function)

Best Answer

This capability is implemented in many programs, including matlab, mathematica, and matplotlib.

If you want to know the underlying algorithms, they work by numerically solving $$\frac{d}{dt} \mathbf{x}(t)=\mathbf{v}(\mathbf{x}(t))$$ where $\mathbf{v}$ is your vector field.

Related Question