Kommandozeilen-Rechner für die Wurfparabel (schiefer Wurf) in Python: berechnet die Flugbahn und gibt sie mit Gnuplot als Grafik aus. Eines meiner frühen Python-Projekte, entstanden aus Physik- und Programmier-Neugier.
- Fragt die Wurfparameter ab: Wurfwinkel β, Geschwindigkeit v, Starthöhe z, Zeitspanne und Schrittweite.
- Berechnet für jeden Zeitschritt die x-/y-Koordinaten der Bahn.
- Schreibt die Wertepaare nach
data.datund plottet sie mit Gnuplot nachwurf.png.
Linux / macOS
sudo ./install.sh # installiert Python 3 + Gnuplot
./start.sh # Werte eingeben -> wurf.pngWindows
wurf.pyausführen und Werte eingebenwurf.pltmit Gnuplot öffnen ->wurf.pngwird erzeugt
Schiefer Wurf: x(t) = v·cos(β)·t und y(t) = v·sin(β)·t + z − ½·g·t²
Mehr dazu: Wikipedia · Wurfparabel
Python 3 · Gnuplot · Bash
🇬🇧 English
A small command-line projectile-motion calculator in Python. It asks for launch angle, velocity, start height, time span and step size, computes the trajectory, writes the points to data.dat and plots them to wurf.png with Gnuplot. Run ./start.sh on Linux/macOS (after sudo ./install.sh), or run wurf.py and open wurf.plt in Gnuplot on Windows.
Frühes Lernprojekt, 2021.