summaryrefslogtreecommitdiff
path: root/throw.py
diff options
context:
space:
mode:
Diffstat (limited to 'throw.py')
-rw-r--r--throw.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/throw.py b/throw.py
index f04e69d..5c4bdfc 100644
--- a/throw.py
+++ b/throw.py
@@ -287,6 +287,34 @@ def solve():
plot(time, soln, ['all', '!gravity'])
pyplot.show()
+def compare():
+ global m, Mass
+ m = 39.7
+ Mass = 650
+ time, soln = solve_fun(throw, inits)
+ plot(time, soln, ['tension'], 8)
+ pyplot.title("Mass = %i" % Mass)
+
+ m = 39.7
+ Mass = 670
+ time, soln = solve_fun(throw, inits)
+ plot(time, soln, ['tension'], 7)
+ pyplot.title("Mass = %i" % Mass)
+
+ m = 39.7
+ Mass = 690
+ time, soln = solve_fun(throw, inits)
+ plot(time, soln, ['tension'], 6)
+ pyplot.title("Mass = %i" % Mass)
+
+ m = 41.81320863
+ Mass = 4172
+ time, soln = solve_fun(throw, inits)
+ plot(time, soln, ['tension'], 5)
+ pyplot.title("Mass = %i" % Mass)
+
+ pyplot.show()
+
if len(sys.argv) == 2:
func_name = sys.argv[1]
if func_name in dir():