Skip to content

47niemand/BodySystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Circle Body System Simulator

This is a simple simulator for a system of bodies with circular shape. It is written in Java and uses the Swing library for the GUI.

Features

  • Collision detection and elastic collision response

    Screenshot

  • Forces

    Screenshot

  • Gravity

    Screenshot

  • Medium resistance

    Screenshot

Building

To build the project clone the repository and run the following command in the root directory:

$ ./gradlew build

Running

To run the simulator execute the following command in the root directory:

$ ./gradlew run

Controls

  • Use numbers 1-6 to select to switch extensions on and off.
  • Use s to set a few bodies.
  • Use r or R to set few bodies.
  • Use a to add a random velocity to all bodies.
  • Use m to toggle collision mesh visualization.
  • Use t to toggle trails.
  • Use c to clear trails and collision mesh.