b2KIT

Vector Field Plotter

Visualize 2D vector fields with arrow plots, streamlines, and magnitude coloring. Enter component functions F(x,y) and G(x,y).

Tested tool guide Tested browser tools Checked August 16, 2026

What Vector Field Plotter does, with a checked example

Type the two component functions of a plane vector field - F(x,y) for the x-direction, G(x,y) for the y-direction - and the tool draws the field over the visible domain: an arrow at every sample point, a magnitude-based color scale, and streamlines that follow the flow. It is a drawing tool, not an equation solver: each arrow is the instantaneous vector at its own point, so the plot is a frozen snapshot of motion. The most common misreading is speed: arrow length is not always a reliable speed cue, so trust the magnitude colors - and verify direction at one point you can compute by hand.

Worked example

A concrete input and expected output from the current implementation.

Input

F(x,y) = -y and G(x,y) = x

Expected output

A counterclockwise rotation field. Along the positive x-axis every arrow points straight up; along the positive y-axis, straight left; the negative axes point down and right. Arrow length and color both grow with distance from the origin, since magnitude is sqrt(x^2 + y^2): the field is weakest at the center and strongest at the view edges. The streamlines are concentric circles centered on the origin.

This is the classic rotation field: divergence 0, curl 2. A particle released anywhere orbits the origin at constant speed, and each arrow is the velocity it has at that point, so every particle path is a circle.

How the result is produced

1

Grid sampling and arrow geometry

The tool covers the visible region with a sampling grid and evaluates F and G at each grid point. Every arrow has the direction of the vector (F, G) there and a length tied to its magnitude, while the color scale encodes the same magnitude. Where a component is undefined - division by zero, square root of a negative - no arrow appears at that point.

2

Streamlines and the color scale

A streamline is an integral curve: a curve tangent to the arrow at every point it passes, so a particle released on one follows it exactly. The tool traces streamlines from seed points by stepping along the local field direction. The color scale maps sqrt(F^2 + G^2), the field magnitude, onto a ramp, which is the reliable way to compare strength between regions.

Good uses

  • Check divergence and curl intuition before calculating: F = x, G = y is a source with arrows radiating outward (divergence 2, curl 0), while F = -y, G = x is pure rotation (divergence 0, curl 2). Seeing the two pictures makes the operators concrete.
  • Draw a phase portrait for a two-variable dynamical system written as x' = F(x,y), y' = G(x,y) - a damped pendulum or a predator-prey model - to see where equilibria sit and whether nearby states spiral in, cycle, or escape.
  • Sketch the electric field of a point charge: enter the Coulomb components F = x/(x^2+y^2)^(3/2), G = y/(x^2+y^2)^(3/2) and watch the field strength fall off as 1/r^2, with arrows shrinking as distance grows.

Limits and checks

  • Arrows that look uniform in length do not prove a uniform field. Plots commonly scale arrow size to the largest vector in view, which flattens differences; read speed from the magnitude colors and confirm at least one point by hand, for example (2, 0) in the Coulomb field above, where the magnitude is 1/4.
  • Undefined points are holes in the plot: at the origin the Coulomb components divide by zero, so no arrow is drawn there, and the surrounding arrows can invite a wrong guess about the singularity. Handle such points analytically or shift the domain before trusting the picture.
  • Sign and order mistakes look fine on screen: swapping F and G turns rotation into a different flow, and one flipped sign reverses every direction, yet both render plausibly. Verify the arrow at a known point, such as (1, 0), against your own calculation.

Common questions

Why do all the arrows look about the same length?

Probably because arrow size is scaled to the strongest vector currently in view, so relative sizes hold within one view but not across different zoom levels or fields. Treat the magnitude color scale as the speed readout, and check one hand-computable point. If the components are genuinely constant, the field really is uniform.

Is a streamline the path a particle actually takes?

For a field that depends only on x and y, yes: the streamline is tangent to the velocity at every point, so a particle released on it stays on it. It does not show speed, though - the same circle can be traversed slowly or quickly, and only the magnitude colors reveal how fast.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools