{"id":23719207,"url":"https://github.com/josiah-mbao/particle-simulator","last_synced_at":"2026-02-12T00:30:18.438Z","repository":{"id":234886102,"uuid":"789687742","full_name":"josiah-mbao/Particle-Simulator","owner":"josiah-mbao","description":"Using Pygame and physics to model particle behaviour in a closed system","archived":false,"fork":false,"pushed_at":"2024-09-09T18:50:18.000Z","size":320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T21:47:13.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josiah-mbao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-21T09:19:07.000Z","updated_at":"2024-09-09T18:50:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6a6afff-274c-4ec0-8545-7e0123319d36","html_url":"https://github.com/josiah-mbao/Particle-Simulator","commit_stats":null,"previous_names":["josiah-mbao/particle-simulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FParticle-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FParticle-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FParticle-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FParticle-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josiah-mbao","download_url":"https://codeload.github.com/josiah-mbao/Particle-Simulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239808510,"owners_count":19700455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-30T21:47:15.301Z","updated_at":"2026-02-12T00:30:18.386Z","avatar_url":"https://github.com/josiah-mbao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Particle Simulator\n\nThis is my second project using **Pygame**, where I've created a particle simulation to explore and apply physics principles to a dynamic environment. The project started as a weekend experiment, but has evolved significantly over time. It now includes features such as particle collisions, obstacles, and visual variations in particle size, mass, and behavior.\n\n## Motivation\nOriginally, the goal was to better understand how physics simulations could be built in Python and Pygame. Over time, this project has grown into a more complex simulator where I experimented with different mechanics, such as:\n- Particle collisions with other particles and obstacles.\n- Variations in particle size, velocity, and mass.\n- Implementing realistic behaviors like bouncing off walls and interacting with obstacles.\n\n## Features\n- **Particle Collision Handling**: Particles collide with each other based on their radius and resolve using basic physics rules.\n- **Obstacle Interaction**: Particles detect and react to obstacles placed on the screen.\n- **Variable Particle Properties**: Each particle has a randomized size, mass, and color to create a dynamic simulation.\n- **Configurable Simulation Settings**: Easily change the number of particles, screen size, and other properties in `settings.py`.\n- **Visual Dynamics**: Particles vary in size and color, making the simulation visually interesting.\n\n## How to Run\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-repo-url/particle-simulator.git\n   cd particle-simulator\n\n2. Install dependencies:\n    ```bash\n    pip install -r requirements.txt\n\n3. Run the simulation:\n    ```bash\n    python main.py\n\n\n## Simulation details\n- **Particle dynamics**: Each particle has a velocity and mass, which affect how it moves and interacts with other particles.\n- **Obstacles**: You can customize the number and position of obstacles within the simulation. Obstacles are immovable objects that particles bounce off of when they come into contact.\n- **Collision Handling**: The simulation checks for collisions between particles and obstacles, resolving them by reversing velocities based on particle mass and size.\n\n## Screenshots\n![Particle Simulation 1](screenshots/pSim1.png)\n\n## Technologies Used\n- **Python**: Core programming language for the logic.\n- **Pygame**: Library for rendering graphics and handling input events.\n\n## Contributing\nFeel free to fork the repository and contribute to improving this simulation. I welcome suggestions for new features or optimizations.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosiah-mbao%2Fparticle-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosiah-mbao%2Fparticle-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosiah-mbao%2Fparticle-simulator/lists"}