forked from zombietype/N-Body-Simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
44 lines (36 loc) · 945 Bytes
/
main.cpp
File metadata and controls
44 lines (36 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// main.cpp
// nbody_bh
//
// Created by Anish Bhobe on 6/16/17.
// Copyright © 2017 Anish Bhobe. All rights reserved.
//
#include <iostream>
#include <vector>
#include "BarnesHutSimulator.hpp"
int main(int argc, char * argv[]) {
// proto
std::vector<double> bs{1, 4, 4, 0, -4, 4, 0};
std::vector<double> br{1, -4, -4, 0, 4, -4, 0};
std::vector<double> bc{1, 2, 2, 0, 2, 2, 0};
std::vector<double> be{1, 2, 3, 0, 2, 2, 0};
std::vector<double> ba{1, 1.9, 3, 0, 0, 0, 0};
std::vector<Celestial::Body> bodies(5);
bodies[0].Create(bs);
bodies[1].Create(br);
bodies[2].Create(bc);
bodies[3].Create(be);
bodies[4].Create(ba);
// proto end
/*
* TODO: Integrator
* TODO: Update function
* TODO: Run
*/
Celestial::BarnesHutSimulator sim;
sim.Create(bodies);
sim.Draw();
sim.Print();
std::cin.ignore();
return 0;
}