
Prompt: Write a Manim script to visualize spacetime curvature caused by a massive object, such as a planet or star. Animation Concept: • The animation should depict a 3D grid or a mesh plane representing spacetime. • A massive object (e.g., a sphere) is placed at the center of the grid. • The grid should warp downward around the object to simulate spacetime curvature. • Optionally, show test particles (small dots or spheres) moving around the curved space to demonstrate how objects follow geodesics. • The grid should smoothly animate from flat space to a curved surface as the mass is introduced. Technical Details: • Use Manim’s 3D capabilities (ThreeDScene). • Implement a parametric surface to represent the warped spacetime. • Animate the gravitational well formation over time. • Use camera rotations to provide a clear perspective. • Optionally, add labels (e.g., "Spacetime," "Mass," "Geodesics") and vector arrows to indicate force or curvature. Extra Features (Optional): • Show multiple masses (binary stars or planets) and their combined spacetime effect. • Add light rays bending around the mass to demonstrate gravitational lensing. • Display Einstein’s field equations briefly before the visualization. • Animate the transition from Newtonian gravity (flat grid with attraction forces) to General Relativity (warped grid).
Make it yours. Replace "spacetime curvature caused by a massive object" with your own concept, and rewrite the bullets under "Animation Concept" to describe what should appear. Keep "Use Manim’s 3D capabilities (ThreeDScene)" for a 3D scene.
Spacetime curvature in 3D Manim
A 54-second 3D Manim animation: a grid warps under a central mass, followed by geodesics, bending light, Einstein's field equations, and a Newton-versus-relativity comparison. Claude 3.7 Sonnet wrote the script, reasoning off, from a prompt ChatGPT drafted.
“to be fair this prompt was written by chatgpt, i just said write me a prompt to create a manim script explaining spacetime curvature, it filled in the details”
You'll need
- Manim Community Edition installed locally to render the script
How it was made
ChatGPT wrote the prompt: the creator asked it for a prompt to make a Manim script explaining spacetime curvature, and it filled in the details. Claude 3.7 Sonnet ran with reasoning disabled. One error needed a second prompt, and Claude fixed it itself. The creator rendered the script with one Manim command. The prompt here was transcribed from a screenshot of ChatGPT's formatted reply, so its bold text is lost, and the screenshot may cut off more text below.
Posted Feb 25, 2025 · r/singularity on Reddit · 403 upvotes · 36 comments
Prompt from: Screenshot in a comment by the creator
Look notesby Reference
A teal checkered mesh on black, flat under a yellow sphere at first and then bent into a deep funnel, with white serif titles and a LaTeX field equation above.
- Color
- Black background, a teal and pale-blue checkered mesh, a yellow sphere, coral-red orbit rings and dots, bright yellow light paths, and white text.
- Type
- White serif titles ("Spacetime Curvature in General Relativity", then "Newtonian Gravity vs. General Relativity"), a LaTeX field equation under the title, and small serif labels. Labels pile up in places: "Curved Spacetime" is partly erased, and "Light Rays" overlaps other captions.
- Framing
- The mesh fills the middle of the frame at a three-quarter angle, with the funnel running off the bottom edge. The title and equation stay fixed at the top. The comparison scene stacks the flat grid and sphere above the curved mesh.
- Structure
- Flat spacetime with the mass, the well under it, coral geodesic orbits around the well, yellow light rays curving through it, the Newton-versus-relativity comparison, and a closing line: "Einstein's key insight: Gravity is not a force, but a manifestation of curved spacetime."





























