{"id":24719304,"url":"https://github.com/simon-gardier/physics-simulation","last_synced_at":"2025-07-13T09:39:24.342Z","repository":{"id":243038775,"uuid":"810520557","full_name":"simon-gardier/physics-simulation","owner":"simon-gardier","description":"🚀Simple Physics simulations","archived":false,"fork":false,"pushed_at":"2024-06-07T11:34:15.000Z","size":309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T11:48:01.185Z","etag":null,"topics":["electromagnetism","info2058","info2059","mecanics","physics","physics-simulation","pygame","python","simulation"],"latest_commit_sha":null,"homepage":"https://en.wikipedia.org/wiki/Physics","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/simon-gardier.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-06-04T21:21:41.000Z","updated_at":"2024-06-07T11:34:18.000Z","dependencies_parsed_at":"2024-06-06T11:38:55.431Z","dependency_job_id":"9cc6fd22-b60b-488f-934e-2963143fe04e","html_url":"https://github.com/simon-gardier/physics-simulation","commit_stats":null,"previous_names":["simon-gardier/physics-simulation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simon-gardier/physics-simulation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Fphysics-simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Fphysics-simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Fphysics-simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Fphysics-simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon-gardier","download_url":"https://codeload.github.com/simon-gardier/physics-simulation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-gardier%2Fphysics-simulation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265121391,"owners_count":23714503,"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":["electromagnetism","info2058","info2059","mecanics","physics","physics-simulation","pygame","python","simulation"],"created_at":"2025-01-27T11:17:21.967Z","updated_at":"2025-07-13T09:39:24.307Z","avatar_url":"https://github.com/simon-gardier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀Simple Physics simulations\n![Release](https://img.shields.io/badge/Release-v1.0-blueviolet?style=for-the-badge)\n![Language](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n\nCollection of physics programs done for the [INFO2058](https://people.montefiore.uliege.be/boigelot/cours/labmp/tutoriel/index.html)/[2059](https://people.montefiore.uliege.be/cornelusse/laboPMP2/outils.html) courses, given by Pr. Boigelot and Bertrand Cornélusse, ULiège.\nThe final mark for the projects is 15/20 for the mechanics section and 20/20 for the electromagnetism section.\n\nNote : No copying (even partial) of this code within the scope of the INFO2058/2059 course will be tolerated.\n\n## ⚙️Mecanics\n- `spaceship.py` : Spaceship simulation. The program simulate the thurst of a spaceship and the gravity exercised by a planet on the spaceship.\u003cbr\u003e\n![Balistic gameplay](/misc/spaceship.png)\n    - Press `Left`/`Right` to adjust the ship nozzle orientation.\n    - Press `Up` to light up the nozzle.\n    - Press `Left-click` to add a planet.\n    - Press `Right-click` to remove a planet.\n    - Press `Q` to quit.\n\n- `gesture.py` : Vertical gesture detection program. The acceleration in shown in red, the velocity in green. A vertical and slow gesture from bottom to top to bottom increases the counter.\u003cbr\u003e\n![Gesture detection example](/misc/gesture.png)\n\n- `complex_movement.py` : Simulation of the movement of a mobile object. The simulation takes place on a curve with frictions tkane into account and with an initial high potential energy position.\u003cbr\u003e\n![Complex movement simulation](/misc/complex_movement.png)\n\n- `balistic.py` : Balistic simulation calculating the right timing to drop a bomb on a target. The y velocity and acceleration is shown in the top left of the screen.\u003cbr\u003e\n![Balistic gameplay](/misc/balistic.png)\n    - Press `A` to drop a bomb automatically (the plane should no be moved on the Y axis after being armed).\n    - Press `B` to drop a bomb manually.\n\n- `balistic1.py` : Balistic simulation calculating the right timing to fire a projectile on a target.\u003cbr\u003e\n![Balistic gameplay](/misc/balistic1.png)\n    - Press `Right-click` to position the red indicator.\n    - Press `A` to initialize the automatic fire.\n    - Press `Left-click` to fire.\n    - Alternatively, press `Up`/`Down` to adjust initial speed, `Left`/`Right` to adjust the canon position to try and aim for the indicator.\n\n## ⚡Electromagnetism\n- `field.py` : Simulation displaying the electrical field between electrical charges. Red is positive, Black is negative.\u003cbr\u003e\n![Field between two charges](/misc/field.png)\n    - Press `Left-click` to add a positive charge.\n    - Press `Right-click` to add a negative charge.\n    - Press `Middle-click` to remove a charge.\n\n- `mobile_charge.py` : Simulation of the trajectory of a mobile negative charge between fixed charges. The potential and kinetic energy of the mobile charge and the mouse position are shown in the top left of the screen.\u003cbr\u003e\n![Field between fixed and mobile charges](/misc/mobile_charge.png)\n    - Press `Left-click` to add a positive charge.\n    - Press `Right-click` to add a negative charge.\n    - Press `Middle-click` to remove a charge.\n    - Press `N` to place a mobile charge.\n\n- `cyclotron.py` : Simulation of the trajectory of a mobile positive charge in a [cyclotron](https://fr.wikipedia.org/wiki/Cyclotron). The magnetic field is facing outward from the screen.\u003cbr\u003e\n![Field between fixed and mobile charges](/misc/cyclotron.png)\n    - Press `Up` to increase the vertical component of the electrical field.\n    - Press `Down` to decrease the vertical component of the electrical field.\n    - Press `PgUp` to increase the magnetic field.\n    - Press `PgDn` to decrease the magnetic field.\n    - Press `C` to automatically handle the magnetic and electrical fields to create a cyclotron.\n    - Press `Spacebar` to reset the simulation.\n\n- `motor.py` : Simulation of a direct current motor. The motor is composed at its center of a rotor of 1000 spires. The stator is composed of two permanent magnets, the magnetic field go from left to right. The winding inductance is not taken into account.\u003cbr\u003e\n![Direct current motor simulation](/misc/motor.png)\n    - Press `Spacebar` to close the circuit.\n\n## Credits\n- [Simon Gardier](https://github.com/simon-gardier) (Co-author)\n- Lei Yang (Co-author)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-gardier%2Fphysics-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-gardier%2Fphysics-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-gardier%2Fphysics-simulation/lists"}