Welcome to the deep-dive documentation for our Vector Field Simulator. A vector field is a mathematical construct that assigns a vector to every point in a subset of space. This tool allows you to explore these fields interactively, providing a visual and intuitive understanding of complex multivariable calculus and physics concepts.
In physics, vector fields are used to model various phenomena such as the velocity of a moving fluid throughout a volume, or the strength and direction of some force, such as the magnetic or gravitational force, as it changes from one point to another point. Mathematically, a vector field F in 2D is defined as:
where P and Q are scalar functions of the coordinates x and y, and i and j are unit vectors in the x and y directions respectively.
One of the most important properties of a vector field is its **Curl**. Curl is a vector operator that describes the infinitesimal rotation of a vector field. At every point in the field, the curl is represented by a vector whose length and direction denote the magnitude and axis of the maximum circulation.
In our simulator, you can use the Measurement Probe to see the real-time Curl value at any point. A positive Curl usually indicates counter-clockwise rotation, while a negative Curl indicates clockwise rotation. In fluid dynamics, if the curl is non-zero, the flow is said to be "rotational."
**Divergence** is another critical operator. It represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point. Conceptually, it measures how much the field is "spreading out" or "converging" at a point.
A point with positive divergence is called a Source (the field lines move away from it), while a point with negative divergence is called a Sink (the field lines move toward it). If the divergence is zero everywhere, the field is called "solenoidal," similar to an incompressible fluid flow.
A Saddle Point is a point in the domain of a function of two variables which is a stationary point but not a local extremum. In a vector field, it often appears as a region where the field flows toward the point from one direction and away from it in another. It looks like a "mountain pass" where you can go up in one direction and down in the perpendicular direction. This is a classic example used in the study of differential equations and dynamical systems.
When you switch to "Solar System" or "Binary Star" mode, the simulator transitions from a static mathematical field to a dynamic physics simulation. Here, we calculate the gravitational force between multiple massive bodies using Newton's law of universal gravitation:
The particles you see on screen are "test particles"—they have negligible mass and are moved by the combined gravitational pull of the stars and planets, effectively tracing the gravitational potential well in real-time. This visualization is unique because it shows the "shape" of space-time around massive objects, similar to the General Relativity concept of curved space.
To ensure high performance and stability, we use numerical integration methods. While the simplest is Euler integration, it often leads to "explosions" in orbit simulations due to energy gain. Our simulator employs more stable routines that conserve energy over time, allowing for the long-term observation of stable planetary orbits and complex binary star interactions.
By exploring these presets and even entering your own equations, you can gain a profound intuitive grasp of the laws that govern everything from the smallest subatomic particles to the largest clusters of galaxies.