{"id":19004022,"url":"https://github.com/victorgoubet/bubble","last_synced_at":"2026-04-20T22:30:20.881Z","repository":{"id":199995955,"uuid":"704667050","full_name":"VictorGoubet/Bubble","owner":"VictorGoubet","description":"Experimental foray into OpenGL and Vispy: A bubble simulation","archived":false,"fork":false,"pushed_at":"2023-10-17T17:32:18.000Z","size":783,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T19:14:16.765Z","etag":null,"topics":["bubble","opengl","pyopengl","shaders","simulation","vispy"],"latest_commit_sha":null,"homepage":"","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/VictorGoubet.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":"2023-10-13T19:16:51.000Z","updated_at":"2024-10-09T17:56:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"1b2fff05-6662-4de8-95ae-e51c72de2c50","html_url":"https://github.com/VictorGoubet/Bubble","commit_stats":null,"previous_names":["victorgoubet/bubble"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorGoubet%2FBubble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorGoubet%2FBubble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorGoubet%2FBubble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorGoubet%2FBubble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VictorGoubet","download_url":"https://codeload.github.com/VictorGoubet/Bubble/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027414,"owners_count":19736210,"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":["bubble","opengl","pyopengl","shaders","simulation","vispy"],"created_at":"2024-11-08T18:21:18.213Z","updated_at":"2026-04-20T22:30:20.817Z","avatar_url":"https://github.com/VictorGoubet.png","language":"Python","readme":"[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/VictorGoubet/Bubble\"\u003e\n    \u003cimg src=\"static/log.png\" alt=\"Logo\" width=\"130\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eBubble\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ci\u003eExploring OpenGL and Vispy through Bubble Interactions\u003c/i\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/VictorGoubet/Bubble\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/VictorGoubet/Bubble/issues\"\u003eReport Bug\u003c/a\u003e\n    •\n    \u003ca href=\"https://github.com/VictorGoubet/Bubble/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About The Project\n\nThe \"Bubble\" project is more than a mere simulation; it's an experimental foray into OpenGL and Vispy, aiming to create a visually appealing interaction of bubbles in a 2D space. The physical concepts in this simulation are largely approximated, serving as a learning and exploration platform rather than a precise physical simulation.\n\n[![Product Screen Shot][product-screenshot]](https://github.com/VictorGoubet/Bubble)\n\nThe bubbles interact through a simplified physics model, where collisions can result in bubbles splitting based on an approximated energy transfer model. This approach, while not physically accurate, provides an interesting and aesthetically pleasing visual display of interacting bubbles, offering a foundation upon which further refinements and features can be built.\n\n### Built With\n\n- [Python](https://www.python.org/)\n- [OpenGL](https://www.opengl.org/)\n- [Vispy](https://github.com/vispy/vispy)\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.x\n- pip\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/VictorGoubet/Bubble\n   cd Bubble\n   ```\n2. Set up a virtual environment (recommended):\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   ```\n3. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n4. Run the simulation:\n   ```bash\n   python3 simulation.py\n   ```\n\n## Hyperparameters\n\nSeveral hyperparameters govern the behavior and visual appearance of the simulation and bubbles:\n\n### Simulation Hyperparameters (Located in `simulation.py`)\n\n- **`n`**: Number of bubbles in the simulation.\n- **`width`** \u0026 **`height`**: Width and height of the simulation window.\n- **`min_radius`** \u0026 **`max_radius`**: Minimum and maximum allowable radii for the bubbles.\n- **`max_speed`**: Maximum allowable speed for the bubbles.\n- **`mode`**: Interaction mode (\"split\", \"merge\", \"overlap\", or \"bounce\").\n\n### Bubble Hyperparameters (Located in `bubble.py`)\n\n- **`density`**: Density of the bubbles, affecting their weight.\n- **`max_speed`**: Maximum speed of a bubble.\n\n## Simulation Details\n\n### Bubble Splitting Mechanism\n\nIn the context of a collision, kinetic energy is transferred between bubbles. Each bubble has a resistance, and if the energy transferred surpasses this resistance, the bubble \"breaks\", splitting into two smaller bubbles. New properties (e.g., radius, position, and speed) for the resulting bubbles are calculated, maintaining a semblance of energy conservation in the system.\n\n## Future Improvements\n\n- **Bubble Merging**: Implement a \"merge\" mode, where bubbles coalesce like water bubbles, forming larger structures instead of splitting.\n\n\n## Contact\n\nVictor Goubet - [LinkedIn][linkedin-url] - victorgoubet@orange.fr\n\n---\n\n\n[product-screenshot]: static/screenshot.png\n[linkedin-url]: https://linkedin.com/in/victorgoubet\n[forks-shield]: https://img.shields.io/github/forks/VictorGoubet/Bubble.svg?style=for-the-badge\n[forks-url]: https://github.com/VictorGoubet/Bubble/network/members\n[stars-shield]: https://img.shields.io/github/stars/VictorGoubet/Bubble.svg?style=for-the-badge\n[stars-url]: https://github.com/VictorGoubet/Bubble/stargazers\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorgoubet%2Fbubble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorgoubet%2Fbubble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorgoubet%2Fbubble/lists"}