← All Labs

Jacobi Iteration — Solving Poisson's Equation

Repeated local averaging converges to the solution — watch the electrostatic potential relax

Potential φ (click to place charges)
Electric Field E = −∇φ
Click canvas to place charges, then Iterate
Poisson: ∇²φ = −ρ/ε₀. Jacobi: φ[i,j] ← ¼(φ[i±1,j]+φ[i,j±1]+ρ[i,j]). Each iteration, every cell averages its neighbors. Gauss-Seidel uses updated values immediately (2× faster). SOR accelerates with over-relaxation ω: φ ← (1−ω)φ_old + ω·φ_jacobi. Red=positive potential, blue=negative, arrows=electric field.