Gravity

Gravity


Gravity is an X11 particle sandbox written in C for my final project in Fundamentals of Computing I. After compiling, execute the Gravity binary and controls will be printed on the screen. Gravity uses the gfx libraries written by R. Bualuan with his permission, which are included in the src folder, along with the program code.

To compile, simply make in the repository root directory.

Controls:

  • Left lick to reset
  • Right click for a bigger reset
  • Type s for a different dot syle
  • Type r for a different color scheme
  • Type a to increase acceleration
  • Type z to decrease acceleration
  • Type “.” to pause
  • Type q to quit

Additionally, there are four different patterns that the program can simulate

  • Type e for a flow pattern
  • Type f for a fade pattern
  • Type g for a gravity pattern
  • Type p for a pulse pattern

Screenshots

Gravity pattern

Gravity

Flow pattern

Flow

Pulse pattern

Pulse

 

Link to Github repository