/BouncingBalls

A simple Python Program using PyGame, to generate balls on the screen upon clicking.

Primary LanguageJupyter Notebook

Bouncing Balls Simulation

This Python program simulates bouncing balls within a window using the Pygame library. When executed, it creates a visual representation of multiple bouncing balls interacting with each other based on simple physics.

Requirements

Python 3.x Pygame library (pip install pygame)

Usage

Clone the repository or download the bouncing_balls.py file.

Install Pygame: pip install pygame Run the script: python bouncing_balls.py Upon execution, a window will open, allowing you to click within the window to create bouncing balls. These balls will interact with each other and the window borders following basic physics principles.

File Structure

bouncing_balls.py: Main Python script containing the simulation. README.md: This file providing information about the program.

Screenshots

image

Additional Notes

Adjust the parameters in the script (like ball size, colors, velocities) to experiment with different behaviors. Feel free to modify the code and adapt it according to your needs.

Contributors

Diptorshi Tripathi