Inspiration
Physics is often taught using numbers that already exist in a textbook. I wanted to make physics feel more real by letting students create the data themselves through everyday movement.
That idea became PhysiLearn: a webcam-based physics lab that turns real motion into measurable experiments and then helps students understand the results.
What it does
PhysiLearn currently has two interactive learning modes.
Tennis Ball Physics Lab
A webcam tracks a real tennis ball and estimates its motion. Using the approximate known diameter of the ball for calibration, PhysiLearn calculates values such as distance traveled, horizontal displacement, time, average speed, velocity, and acceleration.
The experiment also generates position-time, velocity-time, and acceleration-time graphs.
Instead of immediately giving the answer, PhysiLearn creates a physics question from the student's own experiment. For example, the student can calculate average speed using their measured distance and time, and the application checks the answer.
Constant Velocity Challenge
The second mode uses MediaPipe hand tracking. The student tries to move their hand at approximately constant velocity.
PhysiLearn measures direction consistency, velocity variation, and acceleration. A deterministic evaluator then gives a PASS or TRY AGAIN result and explains which part of the motion could be improved.
How I built it
I built PhysiLearn in Python.
OpenCV is used for tennis ball detection and motion tracking, while MediaPipe tracks the student's hand in the constant-velocity challenge. NumPy is used for physics calculations and data processing, Matplotlib generates the motion graphs, and CustomTkinter provides the desktop interface.
The physics measurements, calculations, and evaluation are deterministic. AI does not decide whether the student is correct.
After the experiment has been analyzed, verified experiment data can be sent to a Qwen model through the Featherless AI API. The AI only adds a short personalized coaching suggestion based on those results.
This creates the pipeline:
Computer vision measures → deterministic physics evaluates → AI adds personalized coaching.
Challenges
One of the biggest challenges was turning webcam tracking into meaningful physics measurements.
For the tennis ball experiment, I had to handle calibration, changes in detected ball size, noisy frame-by-frame positions, and velocity and acceleration estimates.
For the hand challenge, I also had to find reasonable thresholds for direction consistency, velocity variation, and acceleration so that the result would not simply PASS every attempt.
Another challenge was deciding where AI should and should not be used. I did not want an AI model to invent measurements or determine whether an answer was correct, so I separated the deterministic physics system from the AI tutoring layer.
Accomplishments
I am proud that PhysiLearn turns an ordinary webcam into a working interactive physics lab without requiring specialized equipment.
The student can perform a real experiment, see graphs generated from their own motion, solve a physics question using their measurements, receive deterministic feedback, and then receive additional personalized coaching.
I also built two different computer-vision experiments inside the same application while keeping the measurement and evaluation logic independent from the AI model.
What I learned
This project taught me that building an educational application involves more than making a feature work technically.
I learned how computer-vision noise affects physics calculations, how calibration changes the reliability of measurements, and how important it is to distinguish between deterministic computation and generative AI.
I also learned a lot about integrating OpenCV, MediaPipe, graphical interfaces, physics analysis, and an external AI API into one complete application.
What's next
I would like to expand PhysiLearn with more experiments, including projectile motion, free fall, and other mechanics topics.
I also want to improve automatic calibration and make the application work reliably with more objects, camera setups, and devices.
The long-term goal is to turn ordinary objects and everyday movement into interactive physics lessons using only a webcam.
Log in or sign up for Devpost to join the conversation.