about summary refs log tree commit diff
path: root/src/python/spiral/exec.py
diff options
context:
space:
mode:
authorhanemile <emile.hansmaennel@gmail.com>2018-02-09 13:42:24 +0100
committerhanemile <emile.hansmaennel@gmail.com>2018-02-09 13:42:24 +0100
commit1b1e0bfd1a5e9d88886b58b0d4db05cafbb36365 (patch)
tree54358cc54ffa8ec0bb068334c0ce699e2fb1035e /src/python/spiral/exec.py
parent50012de6c2fd3eae0aa04b7a2b4e497dc0bae27a (diff)
added the spiral folder
Diffstat (limited to 'src/python/spiral/exec.py')
-rwxr-xr-xsrc/python/spiral/exec.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/python/spiral/exec.py b/src/python/spiral/exec.py
new file mode 100755
index 0000000..37bc821
--- /dev/null
+++ b/src/python/spiral/exec.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+
+import galaxytools as galaxytools
+import time as time
+# import matplotlib.pyplot as plt
+
+# start the timer
+start = time.time()
+
+# generate a new galaxy
+galaxy = galaxytools.new_galaxy(64)
+
+# generate 100 stars
+galaxy.gen_new_stars(1000)
+
+# galaxy.print_stars()
+
+# calculate the forces acting inbetween the stars
+galaxy.calc_all_forces()
+
+# print out the individual forces acting on each star
+# galaxy.print_individual_forces()
+
+galaxy.gen_sphere_positions(0.0001)
+# galaxy.gen_forces_after_t(1)
+
+galaxy.is_star_in_sphere_all()
+
+# save the stop time
+end = time.time()
+
+# calculate the elapsed time
+whole_time = end - start
+
+# print the time and append it to a list
+print("Time:")
+print(whole_time)