Skip to content

Program simulating elastic collisions between round objects.

Notifications You must be signed in to change notification settings

twinksy1/bouncing-balls

Repository files navigation

ABOUT

Small graphical application written in C++ demonstrating elastic collisions between circle objects.

BUILD

  • SDL2 developer library needs to be installed
    • Linux: sudo apt-get install libsdl2-dev
    • Windows: Tutorial

Then in cloned directory:

  • Build: make

Execution: ./main

FEATURES

  • Amount of balls and ball radii can be tweaked near the top of main.cpp
  • Toggle gravity by pressing 'g'
  • Push balls by bumping the mouse into them
  • Left-click to create a force that pushes all nearby balls outward
  • Quick program termination by pressing 'Esc'

GIF OF PROGRAM EXECUTION

GIF

About

Program simulating elastic collisions between round objects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published