Expand description
Electric field computation — Coulomb’s law, field lines, dipoles, capacitors, line charges, and Gauss’s law verification.
Structs§
- Capacitor
- Parallel plate capacitor with uniform field between plates.
- Dipole
- Electric dipole: two equal and opposite charges separated by a small distance.
- Electric
Field Line - Electric
Field Renderer - Renderer for electric field visualization.
- Line
Charge - Finite line charge with uniform charge per unit length.
- Point
Charge
Functions§
- electric_
field_ at - Compute the total electric field at
posfrom multiple point charges via Coulomb superposition. - electric_
potential_ at - Compute the electric potential at
posfrom multiple point charges. - gauss_
flux - Verify Gauss’s law: the electric flux through a closed surface equals Q_enc / eps0. surface_points and normals define the surface; normals point outward. Returns the total flux integral E · dA.
- sphere_
surface - Generate surface points and normals for a sphere centered at
centerwith givenradius. - trace_
field_ line - Trace a field line from
startusing RK4 integration.