Giter VIP home page Giter VIP logo

solarsim's Introduction

Final project for ADS-S18 Barnes-Hut nlogn n-body simulation. This method changes computational time from n^2 to n logn.

To Run:

In the source folder run:

make gen

./gen

this will prompt you first for the number of objects and second for the square dimensional range of the objects. Choose a number of objects up to 1000 objects for a reasonable runtime and a zone between 100 and 1080. This will output n bodies to random x,y positions with random mass into a textfile called output.txt.

Next, run:

make

./quadtreedriver < output.txt > ../output/_filename_.txt

where you replace filename with the desired destination filename.

This may or may not give feedback while running. TBD

Next, feed this output into the graphics program in the readin folder by running. First edit the ofstream line in proto-draw.cpp to the filepath you want (or leave it as is for a predtermined calculation). Then run:

make proto-draw

./proto-draw

Click the play button to begin, and the reset button to restart the graphical output.

By:

Spencer Eanes

Jacob Cabbage

Jason Dickmeyer

solarsim's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.