Drop

Dropping Balls

by Zach F.  ·  Python Processing  ·  Spring 2026

Showcase page developed with AI assistance

Back to TNT
Live Demo

Press ▶ Run to start the simulation

🎮 Controls
  • Left Click — Drop a small ball at cursor
  • Right Click — Drop a BIG red ball
  • R — Spawn a random ball
  • S — Clear all balls
📖 About This Project

Zach (with help from AI) built this physics simulation in Python Processing. Each ball has its own gravity, air-resistance, and damping values. Balls detect collisions with walls and with each other using elastic-collision math.

Big balls launch small balls with extra force on the first hit — look for the launch effect!

Note: The live demo is a faithful JavaScript translation running via ProcessingJS. Zach's original Python source is shown below — browsers can't run Python Processing natively, so ProcessingJS powers the demo.

🧠 CS Concepts
OOP / Classes Gravity Simulation Elastic Collisions Damping & Friction Collision Detection Event Handling Vector Math
📄 Python Source