Skip to main content

Special Relativity

PyPI version Tests GitHub

The specrel package is a Python 3 sandbox tool for understanding basic concepts in special relativity. Easily set up relativistic systems, perform Lorentz transformations, and create plots and animations through a relatively (get it?) simple API.

At a Glance

Spacetime Plots

The Relativity of Simultaneity

Relativity of simultaneity

Faster-Than-Light Communication

Faster-than-light communication

Lorentz Transformations

The Lorentz transformation about some origin

Simple Spacetime Animations

Time Dilation

Time dilation

Length Contraction

Length contraction

Sequential, Multi-Part Spacetime Animations

The Ladder Paradox

The ladder paradox

The Twin Paradox

The twin paradox

Dependencies

  • Matplotlib for plot generation
  • FFmpeg for video file writing (for saving animations)

Installation

The specrel package is meant for simple and/or interactive use. To install, run pip install specrel. If you want to save animations, you'll also have to install FFmpeg on your system.

If you don't want to use pip, you can also "install" the package directory manually by copying it to wherever you want to use it, or by adding the containing directory to the Python path (for example, with sys.path.append).

Usage

Acknowledgements

The visualization tools in this project are somewhat inspired by MinutePhysics's "Intro to Special Relativity" Course; the animated spacetime diagrams and Lorentz transformation animators in specrel serve a similar purpose to the "spacetime globe" (which is just an interactive spacetime diagram) employed throughout the course.

Knowledge of the details of special relativity comes from my own undergraduate education in physics.

Metadata

Release files for specrel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specrel 0.1.0
File Size Uploaded Provenance Actions
specrel-0.1.0.tar.gz 23.3 MB Without provenance Details for specrel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for specrel 0.1.0
File Interpreter ABI Platform Actions
specrel-0.1.0-py3-none-any.whl Python 3 none any Details for specrel-0.1.0-py3-none-any.whl

Total release size: 23.4 MB

Release files / specrel-0.1.0.tar.gz

Download URL specrel-0.1.0.tar.gz
Size 23.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d5e9c8ba7578215fbbf7d1d2056633619608a809b491bfe6366d54596cdae2d8
BLAKE2b-256 checksum
How to use checksums
fdf33ed41f50fdf37f7cc5d3cbd26a5d2c39ecbd7d3130fbb9f9dc8c3c118226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / specrel-0.1.0-py3-none-any.whl

Download URL specrel-0.1.0-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4866e0c96764a21b2fff5b8e9353a3017f7ec1538915b5fd6965d431847527d
BLAKE2b-256 checksum
How to use checksums
4841976c12781792d56ef82bec0dab8cb90ff6d15ca28657b0e2e29391e6ec6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for specrel 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page