Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tethik/n-body-problem
A java physics simulator for simulating the force of gravity.
https://github.com/tethik/n-body-problem
Last synced: 4 days ago
JSON representation
A java physics simulator for simulating the force of gravity.
- Host: GitHub
- URL: https://github.com/tethik/n-body-problem
- Owner: Tethik
- Created: 2013-04-02T01:20:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-02T01:41:46.000Z (over 11 years ago)
- Last Synced: 2024-10-11T08:26:50.542Z (27 days ago)
- Size: 5.05 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
n-body-problem
==============
A java physics simulator for simulating the force of gravity.
Authors: Frederick Ceder and Joakim Uddholm== Requirements ==
1. Java 1.7 (JRE)
2. Ant== Building ==
The project was built in the eclipse IDE but can be compiled by ant if
you wish. Either run the `make` command or the `ant` command and it will
compile the project with the correct.== Running ==
The main programs that might be interesting to you as a tester are:
- 2D visualiser
- the ResultGenerator.Available runnable scripts:
- 2dvisualiser
- grav_single
- grav_multi
- barneshut_single
- barneshut_multi== Input parameters ==
./2dvisualiser numBodies numSteps far numThreads collision width height barnes
./grav_single numBodies numSteps far numThreads collision
./grav_multi numBodies numSteps far numThreads collision
./barneshut_single numBodies numSteps far numThreads collision
./barneshut_multi numBodies numSteps far numThreads collisionnumBodies and numSteps are mandatory, the rest is optional and will fallback to default values
if no others are entered.Defaults:
far = 0.5
numThreads = 1 or 2 (Depending on if sequential run or multithreaded)
collision = true
width = 640
height = 480
barnes = falseDefinitions:
far := Granularity value in barnes-hut algorithm. Does nothing for other implementations.
numThreads := The number of worker threads used. Does nothing for a sequential run.collision := Set if collision physics should be activated or not.
width := Width of the window for the GUI.
height := Width of the window for the GUI.
barnes := Set gravitational force to run with a Barnes-Hut implementation.