Skip to content

Flexible graphics/animation generation for special relativity

License

Notifications You must be signed in to change notification settings

johanngan/special_relativity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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", 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).

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.

About

Flexible graphics/animation generation for special relativity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages