JKelle / GravitySimulator

Objects of different size (mass) will interact with a gravitational field and engage in elastic collisions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GravitySimulator

Objects of different size (mass) will interact with a gravitational field and engage in elastic collisions. The number of and types of objects in the space can only be changed in the source code for now.

How to Play:

  • Play/Pause: space bar (or button)
  • Inc/Dec Gravity: up/down arrow keys (or buttons)
  • Add a center of gravity: Alt+click
  • Clicking a block will show it and it's velocity data in the top section of the panel.

Hints:

  • Try making gravity negative to observe repulsion.
  • Try adding multiple centers of gravity.
  • Try adding several centers of gravity on top of each other. This can give the effect of having different centers having differnt strengths.

About

Objects of different size (mass) will interact with a gravitational field and engage in elastic collisions.


Languages

Language:Java 100.0%