Assuming that an object is moving vertically downwards as well along Y-axis at a velocity of lets say 0.5 m/s while following the elliptical equation,
major axis radius = 100 minor axis radius = 25
Body's initial position can be assumed to be at (x,y) = (175, 150). Ellipse Image
I know how to fetch co-ordinates o ellipse when it is not moving downwards.
a = 25
b = 100
h = 150
k = 150
$ x = \sqrt{a^2 - {(y-k)^2 * a^2 \over b^2} } + h $
$ x = \sqrt{25^2 - {(y-150)^2 * 25^2 \over 100^2} } + 150 $
# Python code:
t = np.linspace(0,360,360)
x = 150 + 25*np.cos(np.radians(t)) # 150 is major axis of ellipse
y = 150 + 100*np.sin(np.radians(t)) # 150 is minor axis of ellipse
# plt.plot(x,y)
# plt.show()
df = pd.DataFrame(list(zip(x, y)), columns = ['x', 'y'])
# remove duplicate rows
df = df.drop_duplicates(keep = 'first')
ax = sns.scatterplot(data = df, x = 'x', y = 'y')
ax.set_xlim(0, 400)
ax.set_ylim(0, 300)
plt.grid()
def solve_for_x(y):
a = 25
b = 100
h = 150
k = 150
x1 = math.sqrt(a**2 - ( ( (y-k)**2 * a**2 )/b**2 )) + h
x2 = - math.sqrt(a**2 - ( ( (y-k)**2 * a**2 )/b**2 )) + h
# print(f'x = {x}')
return x1, x2
This code will return both sides of ellipse.
But my question is how to calculate x and y co-ordinates when the body is moving downwards. I imagine the path traced will be a weird 2d spring like structure.

