Thanks to visit codestin.com
Credit goes to github.com

Skip to content

snflyer/startlink

Repository files navigation

Startlink

Startlink is a Manim-based Starlink constellation visualization project. It renders a 3D Earth scene with Starlink satellite markers, representative orbit curves, labels, scripted camera zoom/rotation, and optional OpenGL interactive embedding.

The project uses public Starlink TLE data from CelesTrak when available, and also supports a local TLE file fallback for reproducible renders.

Project structure

src/starlink_manim/
  config.py      Runtime settings from environment variables
  tle.py         CelesTrak/local TLE loading and parsing
  orbit.py       Orbit propagation and scene coordinate helpers
  scene.py       Manim ThreeDScene implementation

data/
  starlink_sample.tle   Small sample TLE fixture for tests and smoke renders

tests/
  test_starlink_manim.py

starlink_manim_scene.py  Manim-compatible scene entry point

Setup

Install system dependencies on macOS:

brew install ffmpeg cairo pango pkg-config

Create and install the Python environment:

python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'

Run a quick preview

Use the bundled sample TLE file for a fast smoke render:

source .venv/bin/activate

STARLINK_TLE_FILE=data/starlink_sample.tle \
STARLINK_MAX_SATELLITES=3 \
STARLINK_ORBIT_LINE_STRIDE=1 \
STARLINK_ORBIT_SAMPLES=8 \
STARLINK_TRAJECTORY_SAMPLES=12 \
manim -pql --disable_caching starlink_manim_scene.py StarlinkConstellationScene

The rendered video is written under:

media/videos/starlink_manim_scene/480p15/StarlinkConstellationScene.mp4

Use live Starlink TLE data

Download Starlink TLE data from CelesTrak:

https://celestrak.org/NORAD/elements/gp.php?GROUP=starlink&FORMAT=tle

Save it as:

data/starlink_live.tle

Then render a larger preview:

STARLINK_TLE_FILE=data/starlink_live.tle \
STARLINK_MAX_SATELLITES=500 \
STARLINK_ORBIT_LINE_STRIDE=10 \
STARLINK_ORBIT_SAMPLES=24 \
STARLINK_TRAJECTORY_SAMPLES=48 \
manim -pql --disable_caching starlink_manim_scene.py StarlinkConstellationScene

CelesTrak may return HTTP 403 when a large group is requested repeatedly before its data updates. In that case, use the local STARLINK_TLE_FILE workflow above.

Configuration

The scene reads these environment variables:

Variable Purpose Default
STARLINK_TLE_FILE Local TLE file path. If unset, the scene fetches CelesTrak directly. unset
STARLINK_MAX_SATELLITES Limit loaded satellite records for fast previews. Empty means all records. unset
STARLINK_ORBIT_LINE_STRIDE Draw one orbit curve every N satellite records. 25
STARLINK_ORBIT_SAMPLES Samples per displayed orbit curve. 72
STARLINK_TRAJECTORY_SAMPLES Precomputed samples per animated satellite path. 240
STARLINK_INTERACTIVE_EMBED Enable Manim interactive_embed() when set to 1, true, or yes. unset

Quality checks

source .venv/bin/activate
python -m pytest tests
python -m ruff check src tests

Notes

  • Full Starlink renders can be slow. Start with STARLINK_MAX_SATELLITES and increase gradually.
  • Generated Manim output under media/ is ignored by Git.
  • Local live TLE cache files should generally stay untracked; keep only the small sample fixture in the repository.

About

Manim-based Starlink constellation orbit visualization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages