API & MCP

Everything a person can do on Electric & Magnetic Field Line Plotter, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Electric & Magnetic Field Line Plotter

Place point charges (in nC) and long straight wires (in A) in a plane and get a drawing of the electric field lines from positive to negative charges, the magnetic field loops around the wires and the equipotential lines, traced numerically from Coulomb’s law and the Biot–Savart law. The number of lines per charge follows Gauss’s law; probe points give the exact field strength, direction, potential and magnetic flux density. Part of the Proofline math notebook.

Inputs of Electric & Magnetic Field Line Plotter
FieldTypeDefaultDescription
sources (required)textarea—Charges and wires (one per line). “charge q x y” is a point charge q in nC at (x, y) in cm; “wire I x y” is a long straight wire carrying I amperes out of the page (negative: into the page). At most 16 lines; # starts a comment.
linesPerUnitnumber8Field lines per nC (or per 2 A)
equipotentialsbooleantrueDraw equipotential lines
extentnumber—View half-height (cm). Empty: fit the view around the sources.
probestextarea—Probe points (optional). One point per line: x and y in cm. The table lists E, the potential and B there (at most 20).

Example request

Electric dipole with probes on the axis and the bisector

curl -X POST https://prooflinefieldlines.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"sources":"charge 1 -2 0\ncharge -1 2 0","probes":"0 0.0001\n0 3\n6 0"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "proofline-field-lines": { "type": "http", "url": "https://prooflinefieldlines.usefulweb.app/mcp" }
  }
}