Skip to content

iostapyshyn/gravity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gravity

Simulation of Newton's law of universal gravitation written in C + fixed function pipeline OpenGL.

program window

Usage

Compiling

mkdir build
cd build
cmake ..
make

Compilation is done using CMake. GLFW and OpenGL libraries are required to compile this program.

  • GLFW: Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop.

Controls

  • Dragging mouse creates new object
  • Z: Decrease mass of the new object
  • X: Increase mass of the new object
  • C: Clear the objects array
  • P: Pause the simulation
  • D: Remove object closest to the mouse cursor
  • A: Slow down the simulation
  • S: Speed up the simulation
  • ESC: Quit

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Simulation of Newton's law of universal gravitation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published