Instantly visualize 2D vector fields, phase portraits, and the flow of differential equations with real-time particle animation.
JavaScript is the default engine for instant calculations. For higher precision and advanced features, you can switch to the Python engine. Please note that Python requires a one-time setup of 10 - 20 seconds, depending on your connection speed. Wait for the "Ready" message to appear before continuing your work.
^ : Exponents (x^2)sqrt() : Square Rootabs() : Absolute Valuepi, e : Constantssin, cos, tan : Triglog, exp : Logarithmsdx=-y | dy=x
dx=x | dy=-y
dx=2*x*y | dy=y^2-x^2
dx=-x | dy=-y
dx=-y-0.1*x | dy=x-0.1*y
dx=-y+0.1*x | dy=x+0.1*y
dx=y | dy=-sin(x)
dx=y | dy=(1-x^2)*y-x
dx=x*(1-x^2-y^2)-y |
dy=y*(1-x^2-y^2)+x
dx=x-x*y | dy=x*y-y
dx=x-x^3 | dy=-y
dx=y | dy=x-x^3-0.2*y
dx=y | dy=0
dx=cos(y) | dy=sin(x)
dx=x^3-3*x*y^2 | dy=3*x^2*y-y^3
dx=x | dy=y
dx=cot(y) | dy=sec(x)
dx=sec(x) | dy=tan(y)
dx=csc(x) | dy=cos(y)
dx=(x^2-y^2)/(x^2+y^2)^2 |
dy=(2*x*y)/(x^2+y^2)^2
dx=y | dy=x-x^3-0.15*y
dx=y | dy=-sin(x)
The Vector Field Generator is a rigorous computational tool engineered for the visualization and analysis of two-dimensional vector fields and systems of ordinary differential equations (ODEs). By evaluating coupled equations governing horizontal and vertical velocities—expressed as dx/dt = P(x,y) and dy/dt = Q(x,y)—the engine maps complex dynamical systems onto a Cartesian phase plane. Designed for physicists, engineers, and applied mathematicians, this plotter bridges the gap between static vector calculus and dynamic system simulation. It provides a comprehensive suite for analyzing flow fields, identifying topological features, and extracting highly precise analytical metrics without the overhead of heavy desktop software.
Analyzing a vector field requires both macro-level geometric visualization and micro-level calculus operations. The engine employs distinct mathematical methodologies to parse, map, and interrogate the user-defined vector space.
At its core, the tool constructs a phase portrait: a geometric representation of the trajectories of a dynamical system in the phase plane. The engine generates a discretized spatial grid (governed by the user's vector grid density parameters) across the specified domain. At each coordinate node, the system evaluates the partial differential functions to determine the instantaneous velocity vector. These vectors are rendered as a "quiver plot," where the orientation of the arrows indicates the direction of the flow, and the normalized length and color intensity represent the magnitude of the force at that specific coordinate. This global view instantly reveals the system's topological skeleton, exposing attractors, repellers, limit cycles, and saddle points.
To analyze the localized behavior of the vector field, the engine performs numerical differentiation at the origin (0,0). It calculates two fundamental operators of vector calculus:
A critical component of non-linear dynamics is identifying equilibrium points—the specific spatial coordinates where the system is at absolute rest (where both dx/dt = 0 and dy/dt = 0). Rather than relying on inaccurate graphical estimations, this tool invokes a symbolic mathematics engine to solve the coupled equations algebraically. By parsing the user's input into symbolic mathematical objects, the engine can find exact, analytical roots for the system, exposing the fundamental anchor points around which the vector field organizes itself.
While static quiver plots outline the geometry of a field, understanding fluid dynamics and particle kinematics requires temporal simulation. The tool features a high-performance "Pro Mode" animation engine that drops hundreds of virtual particles into the vector space.
To trace the continuous paths of these particles over time, the engine relies on first-order numerical integration (the Euler method). In each programmatic frame, the engine calculates the localized velocity vector for every active particle and updates its positional coordinates by scaling the velocity by a fixed time-step (dt). To visualize flow history, the engine stores a trailing array of positional data for each particle, rendering a fading "comet tail" that illustrates the immediate trajectory. Particles are assigned localized lifespans; as they expire or exit the viewing window, the engine respawns them at random coordinates to maintain a continuous, ergodic representation of the system's flow density.
Rendering thousands of dynamic particles alongside rigorous symbolic calculus demands a highly optimized, fully client-side microservices architecture.
For immediate, real-time feedback, the default engine relies on standard JavaScript paired with the Math.js library. This handles rapid lexical parsing and floating-point evaluation. The visual architecture utilizes a layered DOM approach. The static quiver plots and Cartesian axes are rendered using Plotly.js, leveraging WebGL for hardware-accelerated SVG generation. Superimposed directly over this layer is a transparent HTML5 Canvas element. The particle animation loop executes exclusively on this Canvas layer, allowing the engine to redraw 600 moving particles at 60 frames-per-second without triggering heavy, lag-inducing DOM repaints in the underlying Plotly graph.
When the user switches to the Python engine or requests analytical equilibrium points, the application dynamically loads Pyodide, compiling CPython to WebAssembly. This unlocks two massive scientific libraries directly within the browser:
Traditional non-linear dynamics software often restricts users with steep licensing fees, cloud-computation latency, and steep learning curves. This visualizer is built on a strict Open Access framework:
The Vector Field Generator is an essential utility across numerous applied sciences:
To further enhance your computational workflow and explore different mathematical paradigms, seamlessly integrate this differential plotter with our specialized suite of analytical instruments: