By · Updated

3D Vector Field Plotter

Draw F(x, y, z) as Arrows Online, Free

No ratings yet

Drag to orbit, scroll to zoom, right-drag to pan

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the 3D Vector Field Plotter works

This 3D vector field plotter draws arrows for any field. Type the three components of a vector field F = (Fx, Fy, Fz) as formulas in x, y and z and this page draws it as a cube of arrows you can orbit. Each arrow points along the field at its grid point, its length follows the magnitude and its colour runs from blue for the weakest vectors to red for the strongest. Eight presets cover the fields that come up in vector calculus, fluid flow, electromagnetism and gravity, and every one can be edited.

3D vector field plotter: writing the components

Each box takes an expression in x, y and z with + - * / ^, brackets, the usual functions (sin cos tan exp log sqrt abs atan2 min max and more) and the constants pi and e. -y, x, 0 is a rigid rotation about the z axis; x, y, z is a source flowing outward and its negative a sink; adding a constant 1 to the z component of the rotation turns it into the helical flow shown by default. An inverse-square field such as gravity is -x / r^3 with r = sqrt(x^2 + y^2 + z^2); the preset adds a small constant inside the root so the arrow at the origin stays finite. Write multiplication explicitly with *.

Grid, range and arrow size

Arrows per axis sets how many sample points run along each side of the cube, so 8 gives 512 arrows and 20 gives 8000, which is still quick to draw and rotate. Range is the half-width of the cube, so a range of 3 samples from −3 to 3 on every axis. Arrow size is a percentage of the spacing between grid points: at 90 percent the longest arrow nearly reaches the next point, at 200 the arrows overlap, which sometimes reads better for smooth fields. With Proportional length the longest vector on the grid sets the scale and every other arrow is shorter in proportion, down to a small minimum so the direction stays visible; Uniform draws every arrow the same length and leaves the magnitude to the colour alone, which is the better choice for fields like gravity whose strength changes by orders of magnitude.

Reading the picture

Arrows fanning outward from a point mark a source and arrows converging mark a sink, which is what positive and negative divergence look like. Arrows circulating around an axis show curl. A field where every arrow is parallel, such as the shear preset, has zero curl in the direction of flow but a non-zero curl across it, and the picture makes that easy to see once you orbit to look along z. The rail reports the shortest, longest and mean magnitudes over the grid, and how many points were skipped because the formulas were undefined there.

Bounding box and axes

The cube outline shows the sampled region and the axes helper marks x in red, y in green and z in blue at the origin, with z drawn upward. Switch them off for a cleaner PNG.

FAQ

What fields are built in?

Rotation about z, radial source, radial sink, helical flow, saddle, gravity toward the origin, a magnetic dipole and simple shear. Choosing one writes its three components into the formula boxes so you can read the equations and modify them.

Why do the arrows at the origin look odd for gravity or the dipole?

An inverse-square field is infinite at its centre, and the preset softens it with a small constant inside the root so the middle arrow is merely long rather than undefined. With an odd number of arrows per axis there is a grid point exactly at the origin; use an even number to avoid it, or write your own softening.

Can I draw a 2D field?

Set Fz to 0 and reduce the range or the arrows per axis so only a few layers are drawn; every layer will be identical if the components do not depend on z. Orbit to look straight down the z axis for a flat picture.

How is the colour scale set?

Blue is the weakest vector on the current grid and red the strongest, with the rainbow in between, so the scale is relative to what is drawn. Changing the range or grid size changes which vectors are the extremes and recolours everything.

See also: all 3D Science tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, Tracker Music.

Related tools