cavendish

Yet another gravitational physics simulator

https://github.com/h3nry-d1az/cavendish

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

2d-graphics gui physics-simulation python
Last synced: 6 months ago · JSON representation

Repository

Yet another gravitational physics simulator

Basic Info
  • Host: GitHub
  • Owner: h3nry-d1az
  • License: cc-by-sa-4.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 44.9 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
2d-graphics gui physics-simulation python
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md



Yet another gravitational physics simulator


Cavendish is a gravitational physics simulator written wholly in Python with the aid of pygame and tkinter. It was developed in under a week as a proof of concept for my physics class, and it shall be regarded as such.

Its name comes from my far better-renowned namesake Sir Henry Cavendish, the first measurer of $G$—the universal gravitational constant—, a magnitude profoundly intertwined with the formulae of this program.

Running the simulation

In order to execute this program, you have two different options at your disposal. You can either download the pre-compiled Windows binaries from the "Releases" section, or whether not suitable, utilize the main.py script. A third possible alternative is to compile your own build of the project, yet it is not necessary by any means.

Nonetheless, further instructions on the latter two procedures will be developed below.

Executing main.py

The main.py script contains the launcher of the simulation, so executing it is the recommended way to proceed.

Firstly, ensure pygame is installed on your system by running bash pip install pygame

Finally, run main.py with Python (no command line arguments are accepted): python ./main.py

Compiling with pyinstaller

This method demands an additional dependency, namely pyinstaller, which can be obtained likewise via pip: bash pip install pyinstaller The Makefile will be in charge of all the magic, so one only needs to invoke it: bash make

Your fresh, newly-compiled binaries will be available at dist/cavendish.

Controls

Key Action
↑↓←→ Move the camera.
+/- Zoom in/zoom out.
Pause/unpause the simulation.
Left click Spawn entity.
Right click Despawn entity.

License

[...]

Creative Commons Attribution-ShareAlike 4.0 International Public License

By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.

[...]

Owner

  • Name: Henry Díaz Bordón
  • Login: h3nry-d1az
  • Kind: user
  • Location: 0x1BADB002

I upload videos on YouTube from time to time about math, programming and sometimes even chess

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Push event: 4
  • Public event: 1
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 1
  • Push event: 4
  • Public event: 1
  • Create event: 1