Vector Field Plotter
This vector field plotter draws the field you type as particles that flow along it.
Enter the x and y components, dx/dt and dy/dt, and the plot is moving at once;
add a z component and it becomes a 3D box you rotate by dragging. Switch to Arrows for a grid of static
arrows, or to Polar or Cylindrical coordinates. It runs in your browser and nothing you type is uploaded.
How to use the vector field plotter
- dx/dt and dy/dt - the two fields over the plot. They start as
-yandx, a rotation, already flowing. Type the x component and the y component of your field and the plot redraws as you type. A left-hand side such asdx/dt =is ignored, so you can paste a line as you wrote it. - + z - adds a third field, dz/dt, and turns the plot into a 3D box. Press the small X beside it to remove the Z component and go back to 2D.
- Pan and zoom - drag to pan in 2D, or to rotate in 3D. Scroll or pinch to zoom, or use the zoom in and zoom out buttons. The reset view button restores the default view. With the plot selected, the arrow keys move the view and + and - zoom.
- Plot settings (the gear under the plot) - under Display, choose Particles, the moving flow, or Arrows, a grid of static arrows. Choose the Coordinate system and set the bounds X min, X max, Y min and Y max, plus Z min and Z max in 3D. Each bound starts at -5 or 5.
The 2D plot keeps the same scale on both axes so a circle stays round. On a wide screen you may therefore see more than the bounds you typed, never less.
Vector field examples to try
Type these into dx/dt and dy/dt. With the default bounds of -5 to 5, each one shows a different kind of flow around the origin.
| dx/dt | dy/dt | What you see |
|---|---|---|
-y | x | Rotation: everything circles the origin counterclockwise, faster farther out |
x | y | A source: the flow streams outward from the origin |
-x | -y | A sink: the flow converges on the origin |
x | -y | A saddle: flow comes in along the y axis and leaves along the x axis |
y | -sin(x) | A pendulum: x is the angle and y the angular speed, so the flow circles around the rest position and cuts across at x = ±π |
sin(y) | cos(x) | A periodic pattern that repeats every 2π in both directions |
Particles or arrows: how to read the plot
The two display modes, set under Display in Plot settings, show the same field two ways. Use Particles to see where things go and Arrows to read the field point by point.
- Particles - each one is a short streak pointing back along the path it has just taken. It moves faster, draws a longer streak and takes a brighter colour where the field is stronger.
- Arrows - a grid of arrows, each pointing the way the field points at its position, longer and brighter where the field is stronger.
- Strength is relative. The animation is scaled to the field in view, so multiplying the whole field by 100 does not make it run 100 times faster. Compare strength within one plot, not between two.
Plot a 3D vector field
Press + z and type an expression for dz/dt. The plot becomes a box that you
rotate by dragging and zoom by scrolling or pinching, with Z min and Z max
added to the bounds. The expressions can now use z as well as x and y.
| dx/dt | dy/dt | dz/dt | What you see |
|---|---|---|---|
-y | x | 0.3*z | A spin around the z axis while the flow moves away from the plane z = 0 |
y*z | -x*z | 0 | A spin around the z axis that is faster far from z = 0 and runs the opposite way below it |
Polar and cylindrical vector fields
Open Plot settings and pick Polar or Cylindrical under Coordinate system. The fields are then labelled Fr and Fθ, the radial part (pointing away from the origin or the z axis) and the angular part (pointing around it). Polar is 2D and has no Z component. Cylindrical is always 3D and adds Fz; leave it blank and it counts as 0. The plot itself is still drawn in x, y and z.
For example, Fr = 0 and Fθ = r draws the same rotation as the Cartesian
-y and x, and Fr = r with Fθ = 0 draws the source.
In every coordinate system the expressions can use r and theta as well as
x, y and z.
What you can type
- Variables -
x,y,z,randtheta(orθ). - Constants -
pi(orπ) ande. - Functions -
sin,cos,tan,sec,csc,cot,asin,acos,atan(also writtenarcsinand so on),sinh,cosh,tanh,sqrt,cbrt,abs,ln,log(base 10),log2,exp,floor,ceil,roundandsign. - Operators -
+,-,*,/and^for powers. Multiplication can be implied, so2xyworks, andx²is accepted.
While you are midway through typing, the field you are editing turns red and a message appears under the fields, such as "Enter an expression." or "A bracket is not closed." The plot keeps drawing the last valid field until the new one is complete. A bound that is not a number, or a maximum that is not larger than its minimum, gets its own message.
What this vector field plotter does not do
- It does not plot fields that change with time: there is no
tvariable, anddx/dtis just the label of the field. - It does not show divergence or curl, and it has nothing to export or download. It is a live plot to look at.
- It does not have spherical coordinates, only Cartesian, Polar and Cylindrical.
Frequently Asked Questions
How do I plot a vector field?
Type the x component into dx/dt and the y component into dy/dt. The plot starts with -y and x, a rotation, and redraws as you type, so replace them with your own, for example x and -y for a saddle. Particles shows the flow as moving streaks; Arrows shows a grid of static arrows. Drag to pan and scroll to zoom.
What is a vector field?
A vector field gives every point of the plane or of space an arrow: a direction and a strength. Here the arrow at the point (x, y) is (dx/dt, dy/dt), the two expressions you type. The particles show it by moving the way each arrow points, which is the path a speck dropped into the flow would follow.
How do I make a 3D vector field plot?
Press + z on the plot and type an expression for dz/dt. With a Z component the plot becomes a 3D box that you rotate by dragging and zoom by scrolling or pinching. Set the Z min and Z max bounds in Plot settings to change how much of the z axis the box shows. Press the small X to remove the Z component and go back to 2D.
How do I plot a vector field in polar or cylindrical coordinates?
Open Plot settings and choose Polar or Cylindrical under Coordinate system. The fields are then labelled Fr and Fθ, plus Fz in Cylindrical, and you type the radial, angular and Z parts of the field. In Polar the plot is 2D. In Cylindrical it is 3D, and a blank Fz counts as 0. For example Fr = 0 and Fθ = r draws the same rotation as dx/dt = -y, dy/dt = x.
How do I read the particles and the arrows?
Particles move in the direction of the field and speed up where it is stronger. Their streaks are longer and their colour is brighter where the field is stronger. In Arrows mode each arrow points the way the field points, and is longer and brighter where the field is stronger. Strength is compared within the plot you are looking at.
Does the vector field plotter support spherical coordinates?
No. It supports Cartesian, Polar and Cylindrical. In any of them you can use x, y, z, r and theta inside an expression.
What is the difference between a vector field and a slope field?
A slope field shows only the direction of y' = f(x, y) at each point. A vector field also has a strength, so its arrows differ in length. To see a slope field's solution curves here, type 1 for dx/dt and f(x, y) for dy/dt: the particles then follow those curves, although the arrows still vary in length with the strength of the field.
Is the vector field plotter free, and does it upload anything?
It is free and needs no account or install. The plot is drawn in your browser and what you type is not uploaded. It works in a phone or desktop browser.
Recommended
-
Pilot FriXion Erasable Pens (3 pack)Sketch the field's arrows by hand, then erase and fix them when the plot proves you wrong.
-
Wacom Intuos Small Drawing TabletSketch a field or mark up your problem set digitally with a real pen, not a trackpad.
-
Quntis Monitor Light BarEven light on the page while you work the problem set late at night, without glare on the plot.
Helps keep the tools free. ✨
Images are for illustration only. As an Amazon Associate I earn from qualifying purchases.