Simulation setup
Theme
Hide
Geometry (conductor)
Ellipse
Conductor shape
Ellipse is fast; custom expression uses math.js and is slower.
ellipse
Ellipse: (x-x0)^2 + a (y-y0)^2 ≤ R^2
Custom: F(x,y) ≤ 0
xMin
Plot / sampling box
xMax
Plot / sampling box
yMin
Plot / sampling box
yMax
Plot / sampling box
x0
Ellipse center
y0
Ellipse center
R
Ellipse size
a (ellipse anisotropy)
Matches MATLAB: (x-x0)^2 + a (y-y0)^2 ≤ R^2 (default a=3)
Custom F(x,y) ≤ 0
Use variables x, y and optionally x0,y0,R,a. Example: (x-x0)^2 + 3*(y-y0)^2 - R^2
math.js
Boundary confinement uses segment bisection + numerical normal. Keep dt modest for stability.
Charges & dynamics
ready
N (free charges)
O(N²) interactions; keep N modest for iPad.
Initial free charges
All +1 (as in your current MATLAB) or half + / half −.
all +
All +1
Half +1, half −1
ε0
Arbitrary units
m
Mass of each free charge
dt
Timestep
γ
Drag: F = −γ m v
a
soft
Softening length
nSteps
Total steps (0 = ∞)
Merging / annihilation
Remove opposite-sign pairs if close
on
On
Off
rMerge
Distance threshold
External fixed charges
Edit rows before starting. Rows with q=0 are ignored.
q
x
y
Add fixed charge
Clear all
Visualisation
Field shown
Matches MATLAB: free / fixed / total
total
Free charges only
Fixed charges only
Total (free + fixed)
Plot update every
Simulation steps
Grid resolution
Heatmap (Nx=Ny)
Colorbar
Show magnitude scale
on
On
Off
|E| saturation
Clips the heatmap scale
Quiver arrows
E-field direction
on
On
Off
Arrow stride
Every k grid points
Quiver scale
Arrow length factor
Max arrow length
Hard cap
Equipotentials
Optional contour overlay (slower)
off
Off
On
# contours
Equipotential levels
Runtime
Steps per animation frame
Increase to speed up (stability depends on dt)
Start
Pause
Reset
idle
t = 0
step = 0
N = 0
boundary: bisection + normal
If it feels slow: reduce Grid resolution, increase Plot update every, or reduce N.
2D charges in a conductor
Heatmap: |E|, arrows: E, dots: free charges, squares: fixed charges
render: ready