Field around a current loop

Field around a current loop preview
remixableManimCEmanim-physics3Dturntable

manim/magnetic_field.py

"""Magnetic field: the field threading a circular current loop.

The kit's first orbit asset, and the reason it can be one: the field is
geometry, not a simulation, so `-s` draws it correctly at every azimuth.

The loop is a camera spin, and the current holds still. Ramping it was the
first design and it cost far more than it showed: B is linear in current,
so the arrows only breathe, while rebuilding the field every frame meant
sampling seven hundred points and throwing four fifths away, minutes per
palette at draft size and hours at full. Built once, the whole asset is
free to turn.

Render (the driver does this for every palette; these are for eyeballing):
    P=/opt/homebrew/opt/python@3.11/bin/python3.11
    ASSET_MODE=still  $P -m manim -s -t -r 1600,1600 manim/magnetic_field.py MagneticField
    ASSET_MODE=motion $P -m manim -qh   -r 1080,1080 manim/magnetic_field.py MagneticFieldLoop

The full Manim source and the rendered video come with a plan.