Skip to main content

A minimalist packadge for vizualizing 3D trajectories in space.

Project description

Space Trace

Spacetrace is a simple, lightweight, low-abstraction tool for visualizing astrodynamic trajectories. Spacetrace is agnostic of the physics, coordinate systems and the tools to generate the data. It's sole purpose is to plot trajectories and inspect them visually.

This tool should be used similarly to matplotlib's 3d plotting tool, but optimized for interactivity and inspection, as well as drawing large trajectories at a smooth framerate.

Screenshot 2

Installation

Spacetrace is a standard python package available on pypi:

pip install spacetrace

Spacetrace only depends on numpy as data interface and pyray for drawing.

Usage

The most basic usecase is as follows:

    import spacetrace

    scene = spacetrace.Scene()
    scene.add_trajectory(epochs, states)
    scene.add_static_body(0, 0, 0, radius=6.7e6, name='Earth', color='blue')
    spacetrace.show_scene(scene)

where states is a numpy array of size N x 3 or N x 6 and epochs is a numpy array of size N, with the corresponding times values. This program will draw the trajectory and add a blue sphere, representing Earth for reference.

For more details see the documentation within the source files (spacetrace/*) or the examples (examples/*)

GUI

  • Middle mouse button to pan camera
  • RMB click to offset camera vertically
  • shift + RMB to offset camera horizontally
  • Drag slider at the bottom to readjust time
  • Left click on entity label (top left) to hide/show
  • Press F while hovering over entity label to focus

Changelog

0.1.1

  • Update readme.md

0.1.2

  • Update how color palette works
  • Older python version should now work (as matched is no longer required)
  • Fixed Color type-hinting input
  • Updated raylib requirement to only support version 5.5 due to recent breaking api change
  • Clamped camera pitch to -pi/2 ... pi/2, preventing rendering glitch

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacetrace-0.1.2.tar.gz (95.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacetrace-0.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file spacetrace-0.1.2.tar.gz.

File metadata

  • Download URL: spacetrace-0.1.2.tar.gz
  • Upload date:
  • Size: 95.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for spacetrace-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ca7bf5e48988b4f0437312ae4e0b5c61187962b46bed0b76294f5544705f8810
MD5 752b42e1f6799ca6e31571c604384357
BLAKE2b-256 2c6e7e563eef71e4179ea485b9f79d363b9c4cfa5d0315b1cf39afc3e70d7080

See more details on using hashes here.

File details

Details for the file spacetrace-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spacetrace-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for spacetrace-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b71ed4bc14807f089e5ef9d94aa11fb6ad6796007a4e357a6a8979890749c145
MD5 c6ae9db0ed06925f54d350728ad6b7d5
BLAKE2b-256 7d2035ad174fde1160bdab05b605d614fd91ccb674dad54d20ccf49e968ffb09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page