This repository contains a Python-based simulation for the 2026 USAYPT Problem 4 on Multi-Bounce Kinematics. The simulation models the motion of a ball bouncing on a surface, taking into account aerodynamic forces, gravity, and collisions with the surface.
The 2026 USAYPT Problem 4 on Multi-Bounce Kinematics challenges students to model the motion of a ball bouncing on a surface, considering various factors such as aerodynamic forces, gravity, and collisions. This repository provides a Python-based solution to this problem, utilizing numerical methods to simulate the ball's motion.
The simulation consists of the following components:
- Ball: Represents the ball's physical properties, such as mass, radius, and moment of inertia.
- Aerodynamics: Models the aerodynamic forces acting on the ball, including drag and lift.
- Surface: Represents the surface on which the ball bounces, including its normal vector and size.
- Collision Detection: Detects collisions between the ball and the surface, updating the ball's velocity and angular velocity accordingly.
- Numerical Integration: Utilizes the Runge-Kutta method to numerically integrate the ball's motion over time.
The code is organized into the following modules:
forces.py: Contains functions for calculating aerodynamic forces and torques.bouncesim.py: Defines theSimulatorclass, which manages the simulation and updates the ball's state.main.py: Provides a simple example usage of the simulation.
To run the simulation, simply execute the main.py script. This will simulate the ball's motion and plot its trajectory.
Contributions are welcome! If you'd like to improve the simulation or add new features, please fork the repository and submit a pull request.
This repository is licensed under the MIT License. See LICENSE for details.