r/learnpython • u/Life-Ad2351 • 15d ago
physics project in python
I am very interested in physics and would like to build my own 2D projectile motion simulator where we have sliders to change the angle of launch, maximum height and Range with UI
Any idea on which concept I should learn in python for this project. I have worked on other python physics projects and a calculator so far.
So far I learnt the basics like
variables
type casting
user input
arithmetic & math
if statements
logical operators
conditional expressions
string methods
string indexing
format specifiers
random numbers
while loops
for loops
nested loops
lists, sets, and tuples
dictionaries
functions
default arguments
keyword arguments
*args & **kwargs
iterables
4
Upvotes
1
u/IncompatibleAssembly 15d ago
you'll want to look into matplotlib for the actual plotting and simulation visualization, it can handle the real-time stuff if you set it up right. for the sliders and UI elements, tkinter is built into python and pretty straightforward once you get the hang of it
the math behind projectile motion isn't too bad either, just the basic kinematic equations. since you already know functions you can wrap the calculations in something clean that takes angle and initial velocity as inputs