Dynamic Geometry Animator is a lightweight toolkit built on top of Manim for creating interactive geometric constructions. It focuses on defining reusable geometric elements (points, lines, circles, and more) whose positions are updated dynamically as their dependencies move. The toolkit is designed for educational visuals, algorithm demonstrations, and exploratory geometry experiments.
Looking for the original Chinese documentation? See
README.zh-CN.md.
- Composable primitives such as
DotandBetweenDotthat propagate updates to dependent elements. - Scene orchestration helper (
SceneManager) that batches Manim animations to keep interactions smooth. - Manim-native objects so the resulting scenes can be rendered with the Manim CLI without additional adapters.
- Extensible element base class that makes it straightforward to add new geometric constructions.
Dynamic Geometry Animator uses Poetry for dependency management.
git clone https://github.com/2027L16/geometry.git
cd geometry
poetry installRender the included example scene to verify the setup:
poetry run manim basic_scene.py TestScene -pThis command opens a preview window that shows:
- Two points
AandB. - A point
Cthat stays on the segmentABwhile maintaining a configurable ratio. - Additional points created dynamically after moving
A.
The animation demonstrates how dependent elements respond when their parents move via Dot.move_to or coordinate assignments.
| Module | Description |
|---|---|
core/scenemanager.py |
Defines SceneManager, a thin wrapper around manim.Scene that accumulates and plays transition animations in batches. |
elements/base.py |
Provides the abstract Element base class with subscription mechanics for dependency updates. |
elements/dot.py |
Implements concrete point elements, including proportional points (BetweenDot). |
basic_scene.py |
Demonstrates how to assemble a scene using the provided components. |
Extend the toolkit by subclassing Element and implementing the to_manim and update hooks to describe how your element is rendered and refreshed.
-
Run static analysis with Ruff before committing:
poetry run ruff check .
-
Execute the automated tests:
-
Execute the automated tests:
poetry run pytest
-
Prefer fast, logic-focused tests under
tests/. For rendering-heavy features consider isolating geometry calculations to keep the suite lightweight.
- Add line and circle primitives with the same reactive update model.
- Provide higher-level construction presets (perpendicular bisectors, angle bisectors, circumcenters, etc.).
- Publish documentation with rendered GIFs of example scenes.
Issues and pull requests are welcome! Please read CONTRIBUTING.md and follow the CODE_OF_CONDUCT.md before participating.
Released under the GNU GPL v3.