Field visualizations sample a vector function at selected locations. Arrow density, length scaling, color, camera direction, and singularity handling are display encodings. They can make a model easier to inspect, but they must not change the sampled physics or quietly substitute visual length for a numerical magnitude.
The object to visualize is a function, such as a point-charge field:
\[\mathbf E(\mathbf r)=kq\frac{\mathbf r-\mathbf r_s}{\lVert\mathbf r-\mathbf r_s\rVert^3}\]At every grid coordinate, retain the actual vector and magnitude. A renderer may cap arrow length with a rule like displayLength = min(scale × |E|, cap), but a cap turns magnitude into a lower-bound visual statement: two arrows of equal maximum length may represent very different fields. The legend must say so, and the selected-probe text must report the uncapped value in units.
Sampling density answers a display question, not a physics question. A denser grid exposes local turning but can hide arrows through overlap; a sparse grid can miss structure between samples. Keep a single probe fixed while changing density. Its numerical vector should not move merely because rendering points were regenerated. If it changes, the code has coupled analysis to display resolution.
Field lines are a different derived construction from arrow samples. They need a seed policy and numerical streamline integration; arrow direction alone neither proves nor draws them. Likewise, a 2D plot may show one slice through a 3D field. State the plane, viewing orientation, and any components omitted from display.
Loading the interactive visual. The lesson text and model remain available while it starts.
Prediction: Clamping arrow length improves readability but hides absolute magnitude differences, while changing density leaves a fixed probe’s field unchanged.
Choose a probe away from the source and record its x/y components and magnitude. Change grid density and visual scale independently. Verify the probe text is unchanged, then activate or imagine an arrow cap and explain why equal displayed lengths no longer imply equal field magnitude. State the plane, units, and singularity behavior needed to reproduce one arrow.Make field sampling and visual encoding separate. Expose exact, unit-bearing numeric state behind the display, preserve its configuration, and ensure the textual fallback supports the same conceptual conclusion as the Three.js view.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Electric Field Visualization, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Electrostatics, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Electric Field Visualization as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Render sampled field vectors without conflating visual scaling choices with physical state.