Jump to content

Visualizing a vector field streamlines

[DRAFT]

Posted in JavaScript · 1 minute read

What is a vector field? #

Vector fields are used in physics and engineering and it assigns a vector to every point in space. This might feel confusing, but I think it will be clearer when we draw one. If we display vectors as arrows we get this:

If you think that it is looking like air or water flow, you are right. Among other things, vector fields are used for flow simulations.

How to visualize a vector field #

Technically we already saw one way of visualizing it. If we draw vectors in each point of the grid, it gives a pretty good idea of the flow direction and the speed.

Drawing a single line #

Using random seed points #

Prevent overlaps #

Using normal points for seeds #

https://en.wikipedia.org/wiki/Vector_field

Streamlines https://en.wikipedia.org/wiki/File:Cessna_182_model-wingtip-vortex.jpg