Gravity well

Gravity well preview
remixableManimCE3Dgravityturntable

manim/gravity_well.py

"""Gravity well: a sheet dimpled by two masses, the lighter one going round.

The only asset in the Gravity kit that does not simulate. The sheet's height
is a sum of wells, which is a picture of gravity rather than a computation
of it, so `-s` draws it with no help.

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/gravity_well.py GravityWell
    ASSET_MODE=motion $P -m manim -qh   -r 1080,1080 manim/gravity_well.py GravityWellLoop
"""

import numpy as np
from manim import (
    DOWN,
    LEFT,

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