6 * @author Sam Moore (205030628)
7 * @purpose N-Body simulator: declarations of simulation related parameters
10 #define M_PI 3.14159265358979323846264338327950288 /* pi */
14 #define square(x) ((x)*(x))
18 * Structure to represent a single Body
19 * @param mass - Mass of the body
20 * @param x - Position vector (array)
21 * @param v - Velocity vector (array)
22 * @param F - Net force vector (array)
36 * Structure to store an array of bodies, along with the size of the array
37 * @param N - Size of the array
38 * @param body - The array of bodies
47 void Body_Print(Body * a); //Print body a
48 void Body_Force(Body * a, System * s); //Compute force on body a due to system of bodies s
49 void Body_Velocity(Body * a); //Compute velocity of body a
50 void Body_Position(Body * a); //Compute position of body a
52 System * System_Init(char * fileName); //Initialise System (array of bodies) from a text file
54 void System_Step(System * system); //Perform a single computation step for a System