Skip to content

freixas/gamma

Repository files navigation

Gamma Gamma Symbol - A Minkowski Spacetime Diagram Generator

Gamma is a tool you can use to draw a wide variety of 2D Minkowski spacetime diagrams. In addition to the usual static diagrams, you can also create animated diagrams, and you can add toggles, choices, and sliders to manipulate the diagram.

You specify the problem using a special language designed specifically for the task; the tool generates the diagram from your specification. For example, this code would create a simple diagram with two observers, one moving at 80% the speed of light relative to the other. The axes for the stationary observer drawn, as are the worldlines for both observers.

observer1 = [observer ];
observer2 = [observer velocity .8];

axes ;
worldline observer1, style: "color: blue";

The best way learn about Gamma is to download the application and run the sample scripts (Gamma programs) under Help / Sample Scripts.

Screenshots

Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4

Features

Commands used for drawing

  • Axes - relative to any inertial frame
  • Grids - relative to any inertial frame
  • Hypergrids
  • Events
  • Worldlines
  • Lines
  • Paths
  • Labels

Physics-based Objects

  • Coordinates
  • Inertial frames
  • Observers
  • Lines
  • Paths
  • Bounds
  • Intervals

Expressions

  • Floating point numbers and character strings
  • Variables, including animated variables and variables controlled by the end user
  • All common mathematical operators, including one especially for Lorentz transformations
  • All common mathematical functions, as well as a number of relativity-related functions

Other features

  • Specify observers whose worldlines include multiple segments with varying acceleration
  • Extract the instantaneous moving frame for any observer at any point along their worldline
  • Create lines parallel or intersecting the axes of any inertial frame
  • Find the intersection of lines or a line and a worldline
  • Given a point on a worldline, get the matching velocity, x position, time, or tau
  • Specify a problem relative to one inertial frame and draw it relative to another
  • Completely customize the appearance of the diagram (color, line thickness, line style, fonts, etc.)

Download and install

The release page includes installers for:

  • x64-based Windows 11 systems (likely to work on x64 Windows 7-10).
  • x64 Debian-based Linux distributions
  • x64 Debian-based Linux distributions
  • arm64-based macOS 14 systems
  • arm64-based macOS 15 systems

There is also a universal tar.gz file which should work on any system with Java and JavaFX.

Currently, the Windows installer has received the most testing, the Unix installers have received some, and the macOS installers have received none.

Installation Instructions

Installing on Windows
  • Download the Windows installer.
  • In Explorer, double-click on the MSI file. Follow the usual prompts.
Installing on Linux
  • Download the Debian installer.
  • In the Linux file manager, double-click on the DEB file. Follow the usual prompts.

Alternately, from a terminal window, type:

sudo apt install <path-to-DEB-file>

I have had some problems running the installer by double-clicking on the DEB file on fresh installation of Ubuntu-24. Also, the Snap version of Firefox can't access the help files in /opt/gamma/help (non-Snap versions of browsers work).

Installing on the Mac

I don't currently have a Mac to test on, but I did have brief access to a macOS "Big Sur", and was able to install and run Gamma there.

  • Download the Mac installer.
  • In Finder, double-click on the DMG file. Follow the prompts and move the gamma icon into the Applications folder.

Because I am not willing to pay Apple $99/year to sign and notarize my open-source software, the application will appear to install properly, but will complain about being "damaged" and won't run.

Bring up a terminal window and enter these commands:

cd /Applications
sudo xattr -r -d com.apple.quarantine gamma.app

These commands might be specific to "Big Sur". If anyone manages to install Gamma on more recent macOS versions, let me know what worked.

Installing the universal tar.gz file  
Install Java and JavaFX

The universal tar.gz file will allow Gamma to run on any system that supports Java, but it requires installed versions of Java and JavaFX. If you don't have Java or JavaFX version 25 (or later) on your system, you will need to install these packages.

On the web, you can find detailed instructions (and videos) for installing Java and JavaFX. Install version 25 or later of these two packages (the version numbers of the two should match).

Java and JavaFX are available from various vendors. All of these should work, but I used versions from:

Install Gamma

Download universal tar.gz from the GitHub release page. Extract the included gamma-x.x.x folder to any location. If you unpacked the file into , then add <some path> to your PATH.

At the top level of the Gamma folder, you will find two files:

  • gamma
  • gamma.bat

The first is for running Gamma on Linux/macOS, the second is for running Gamma on Windows. You will need to edit the file using any text editor so that Gamma can locate the appropriate Java and JavaFX packages. If these environment variables are set globally, you can skip this step.

Run Gamma

To run Gamma from a terminal window, enter:

  • gamma.bat (Windows)
  • gamma (Mac/Linux)

You may be able to link the command to a desktop icon to make it more convenient to run. You may still see a brief appearance of a terminal window.

Building

To build the application from source, you will need to get and install:

  • Java 25 or later. The Java executables need to be on your path.
  • Maven, version 3.9.11 or later
  • Git, version 2.51.1 or later
  • For Windows, the latest WiX toolset.

Using git, clone the branch or tag you are interested in. The latest branch is the highest numbered one in the form vn.m.x.

git clone --single-branch --branch <branchname> https://github.com/freixas/gamma

In the top level folder, type mvn clean package

When the dust settles, The target folder will contain an installer for your system as well as the universal ZIP file.

Contributing

Currently, I'm looking for physicists willing to install and review the application. Open an issue for bugs, but send general comments to gamma@freixas.org.

If you'd like to contribute to the code, write to gamma@freixas.org with your ideas for changes.

License

Gamma is licensed under GPLv3.

Contact

Or write to gamma@freixas.org.

Gamma was written by Antonio Freixas.

About

A Minkowski Spacetime Diagram Generator

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages