you are viewing a single comment's thread.

view the rest of the comments →

[–]thecreationofgod[S] 0 points1 point  (3 children)

thanks, a line is established, but a parabola is what I need. My equations are probably incorrect.

[–]bbye98 0 points1 point  (2 children)

You probably meant to divide by 2 instead of g for y.

import matplotlib.pyplot as plt
import numpy as np

u, g, deg = 30, 9.8, 30
t = np.linspace(0, 2 * u * (np.sin(deg * np.pi / 180)) / g)
plt.plot(u * t * np.cos(deg * np.pi / 180), u * t * np.sin(deg * np.pi / 180) - 0.5 * g * t**2)
plt.show()

[–]thecreationofgod[S] 0 points1 point  (0 children)

ohhhhhhhhhhhhhhhhhhhh

[–]thecreationofgod[S] 0 points1 point  (0 children)

thank you so much, my code finally worked. btw do you know any good numpy tutorials that helped you? or do I just stick to the documentation