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.
- Matplotlib for plot generation
- FFmpeg for video file writing (for saving animations)
The specrel
package is meant for simple and/or interactive use. To "install", first check the package dependencies. Then, simply place the specrel
package directory wherever you want to use it, or manually add the containing directory to the Python path (for example, with sys.path.append
).
- For a walkthrough of how to use this package, see the guided tour.
- For general documentation, see the docs.
- For example code, see examples.
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.