Vector Field Plotter

Visualize 2D vector fields interactively. Plot gradient fields, divergence, curl, and streamline flows with this powerful visualization tool.

Vector Field Definition: F(x,y) = (P(x,y), Q(x,y)) where P is the x-component and Q is the y-component

Function for the x-component of the vector field
Function for the y-component of the vector field
Rotation Field
Radial Field
Saddle Field
Gravitational Field
Sine/Cosine Field
Shear Field
Complex Field
Constant Field
1.5
Advanced Options
Number of streamlines to display
Number of arrows in each direction
Generating vector field...
Low Magnitude High Magnitude

Understanding Vector Fields

A vector field assigns a vector to each point in space. In 2D, it can be represented as F(x,y) = (P(x,y), Q(x,y)), where P and Q are scalar functions.

Mathematical Definition:

For a 2D vector field F: ℝ² → ℝ²:

F(x,y) = P(x,y)î + Q(x,y)ĵ

where î and ĵ are unit vectors in the x and y directions respectively.

Key Properties of Vector Fields

Property Formula Physical Meaning Example
Divergence (∇·F) ∂P/∂x + ∂Q/∂y Measures source/sink strength Positive = source, Negative = sink
Curl (∇×F) ∂Q/∂x - ∂P/∂y Measures rotation strength Positive = CCW rotation, Negative = CW rotation
Gradient Field F = ∇φ Conservative field, path-independent Gravitational, electrostatic fields
Streamlines dy/dx = Q/P Curves tangent to vector field Flow lines in fluid dynamics
Potential Function ∇φ = F Scalar function for conservative fields φ such that ∂φ/∂x = P, ∂φ/∂y = Q

Common Vector Fields

1

Radial Fields: Vectors point directly away from or toward a central point. Example: F(x,y) = (x, y) points outward; F(x,y) = (-x/(x²+y²)³/², -y/(x²+y²)³/²) is gravitational attraction.

2

Rotational Fields: Vectors rotate around a central point. Example: F(x,y) = (-y, x) rotates counterclockwise around the origin.

3

Shear Fields: Vectors slide layers relative to each other. Example: F(x,y) = (y, 0) represents horizontal shear.

4

Gradient Fields: Vector field is the gradient of a scalar potential function. Example: F(x,y) = (2x, 2y) is the gradient of φ(x,y) = x² + y².

Applications of Vector Fields

  • Fluid Dynamics: Velocity fields in liquids and gases
  • Electromagnetism: Electric and magnetic fields
  • Meteorology: Wind velocity and atmospheric pressure fields
  • Engineering: Stress and strain fields in materials
  • Computer Graphics: Procedural textures and fluid simulations
  • Geophysics: Gravitational and magnetic fields of planets

Plotter Features:

  • Interactive visualization of 2D vector fields
  • Real-time calculation of divergence and curl
  • Streamline tracing for flow visualization
  • Color mapping by vector magnitude or direction
  • Export functionality for images and data
  • Support for complex mathematical expressions

Frequently Asked Questions

A scalar field assigns a single number (scalar) to each point in space (e.g., temperature, pressure). A vector field assigns a vector (magnitude and direction) to each point (e.g., velocity, force). Vector fields are visualized with arrows, while scalar fields are often visualized with color maps or contour lines.

Vector arrows show the direction and magnitude of the field at discrete points. Streamlines are curves that are everywhere tangent to the vector field, showing the path a particle would follow if it moved with the field. Streamlines give a better sense of flow patterns, especially in complex fields.

Divergence measures the tendency of a vector field to originate from or converge into a point. Positive divergence indicates a source (field vectors flowing outward), negative divergence indicates a sink (field vectors flowing inward), and zero divergence indicates the field is source-free (like an incompressible fluid).

Curl measures the tendency of a field to rotate around a point. In 2D, a positive curl indicates counterclockwise rotation, while negative curl indicates clockwise rotation. The magnitude of the curl indicates the strength of rotation. A field with zero curl everywhere is called irrotational.

This tool is specifically designed for 2D vector fields. For 3D vector fields, visualization becomes more complex as it requires 3D rendering and interaction. However, you can visualize 2D slices of 3D fields by fixing one coordinate (e.g., z=0) and plotting the remaining components as functions of x and y.