Skip to content

h4x0rMadness/NBody-Simulation-project0-cs61b

Repository files navigation

UCBerkeley CS61B Project0

Description

This is project0 code for UCBerkeley CS61B project0: NBody Simulation.

Part of the available simulations below.

Solar system, part of it.

Three body simulation.

How to play with it

  1. download this repo:
git clone https://github.com/h4x0rMadness/cs61b-proj0.git
  1. direct into proj0 folder in your terminal:
cd /proj0
  1. make sure you have java installed and your javac works correctly, then compile NBody class first:
javac NBody.java
  1. now you can choose what you wanna simulate in data folder, make sure give all parameters, the standard way to call NBody is:
java NBody arg1 arg2 arg3

where arg1 and arg2 are total simulation time and discrete simulation interval, both are of double datatype, and arg3 is the relative path of the file you want to simulate, in this case, it should be data/somefile.txt, for example:

java NBody 157788000.0 25000.0 data/planets.txt
  1. have fun!

Body and NBody class coded with guidance on course page, all credit to UCBerkeley cs61b.

About

NBody Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages