SimRzutUkosny/Analityka.py
2025-05-16 19:01:31 +02:00

13 lines
330 B
Python

import numpy as np
def analitycznePolozenie(v0, theta, h0, t):
# wartosc przyspieszenia ziemskiego
g = 9.81
# stopnie na radiany
theta_rad = np.radians(theta)
# Rownania parametryczne dla x(t) i y(t)
x = v0 * np.cos(theta_rad) * t
y = h0 + v0 * np.sin(theta_rad) * t - 0.5 * g * t**2
return x, y