Special Relativity
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
Faster-Than-Light Communication
Lorentz Transformations
Simple Spacetime Animations
Time Dilation
Length Contraction
Sequential, Multi-Part Spacetime Animations
The Ladder 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
- For a walkthrough of how to use this package, see the guided tour.
- For general documentation, see the docs.
- For example code, see examples.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specrel-0.1.0.tar.gz.
File metadata
- Download URL: specrel-0.1.0.tar.gz
- Upload date:
- Size: 23.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5e9c8ba7578215fbbf7d1d2056633619608a809b491bfe6366d54596cdae2d8
|
|
| MD5 |
60e3911c7ce0b997832f2b79036f9f23
|
|
| BLAKE2b-256 |
fdf33ed41f50fdf37f7cc5d3cbd26a5d2c39ecbd7d3130fbb9f9dc8c3c118226
|
File details
Details for the file specrel-0.1.0-py3-none-any.whl.
File metadata
- Download URL: specrel-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4866e0c96764a21b2fff5b8e9353a3017f7ec1538915b5fd6965d431847527d
|
|
| MD5 |
dd2471c7e7027b79e6951758f68f39a0
|
|
| BLAKE2b-256 |
4841976c12781792d56ef82bec0dab8cb90ff6d15ca28657b0e2e29391e6ec6e
|