Electric field

Electric field preview
remixableManimCEmanim-physics2Dloop

manim/electric_field.py

"""Electric field: a dipole, with the field redrawn as one charge travels.

The first asset in the Physics kit. Three things about `manim-physics` shape
it, all of them recorded in the kit header in the catalog:

- `Charge` paints itself RED or BLUE and offers no way to ask for anything
  else, so both charges are repainted after construction. In `Ink` the two
  roles collapse to one black, which is why the sign has to be carried by
  the glyph the class already draws: plus is two bars, minus is one.
- `ElectricField` reads its charges' positions once, at construction, so a
  moving charge means rebuilding the field rather than updating it.
- Nothing here simulates, so `-s` renders it correctly and the still needs
  no help. Only `pendulum` in this kit does.

Render (the driver does this for every palette; these are for eyeballing):
    P=/opt/homebrew/opt/python@3.11/bin/python3.11

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