Work

A Browser-based 3d Animation Program for Teaching the Ampère and Lorentz Forces: Development, Numerical Verification and Instructional Use

Year: 2026
Type: article
Abstract: Understanding the Ampère and Lorentz forces requires students to relate three mutually perpendicular vectors in space, a task that flat diagrams and hand rules support poorly. This study describes the development, numerical verification and instructional use of a browser-based 3D animation program for teaching these forces in undergraduate physics. The program, built with Three.js (WebGL) and JavaScript, contains four modules: the Ampère force on a current-carrying conductor, the torque on a current loop, the motion of a charged particle in a uniform magnetic field, and a crossed-field velocity selector. Particle trajectories are integrated with the Boris algorithm, which conserves kinetic energy in a purely magnetic field. The numerical model was verified against analytical solutions for a proton (B = 0.1 T, v = 10⁵ m/s) over 100 revolutions. The mean orbit-radius error fell about fourfold each time the number of steps per revolution was doubled, from 10.9% at 8 steps to 0.011% at 256 steps; at the 64 steps used in the program it was 0.18%. The relative change in kinetic energy did not exceed 2×10⁻¹⁴, the helix pitch was reproduced to within 10⁻¹³, particles with v = E/B passed the velocity selector undeflected, and the E×B drift speed differed from E/B by 0.08%. Each module includes a prediction mode in which students mark the expected force direction or trajectory before the animation runs. The program therefore provides a quantitatively accurate environment for prediction–observation–explanation activities on magnetic forces; its effect on learning outcomes is left to future classroom research.
Language: English
Subfield: Education
Open Access status: diamond
OpenAlex ID: W7236970367
FWCI:
Cites:
Cited by:
Related to: 10