Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# gravity
Modeling the trajectory of ball under the force of gravity
## Modeling the trajectory of ball under the force of gravity

A Study of the Utmost Gravity

A set of functions to calculate the effects of gravity.

22 changes: 0 additions & 22 deletions gravity_of_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,4 @@ def xy(t, xy0, v0):
(vx0,vy0)= v0
return x0 + vx0 * t, y0 + vy0 * t + 1./2 * g * t**2

try:
xy0 += (0,0)
except (NameError, TypeError):
x0 = float(input("Initial position x0 = "))
y0 = float(input("Initial position y0 = "))
xy0 = (x0, y0)

try:
v0
except (NameError, TypeError):
vx0 = float(input("Initial speed vx0 = "))
vy0 = float(input("Initial speed vy0 = "))
v0 = (vx0, vy0)
finally:
try:
trajectory = [(t/2.,) + xy(t/2., xy0, v0) for t in range(8)]
except:
print("data has problems: " + str(xy0))



print(trajectory)