{"id":26504645,"url":"https://github.com/lbirkert/three-body-problem","last_synced_at":"2025-07-13T17:40:30.576Z","repository":{"id":248929576,"uuid":"830211020","full_name":"lbirkert/three-body-problem","owner":"lbirkert","description":"a three-body physics simulation written in python","archived":false,"fork":false,"pushed_at":"2024-07-17T20:39:23.000Z","size":7779,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T13:22:15.437Z","etag":null,"topics":["physics","python","simulation","three-body-problem","three-body-simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbirkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-07-17T20:26:37.000Z","updated_at":"2024-07-17T20:41:43.000Z","dependencies_parsed_at":"2024-07-18T00:47:55.554Z","dependency_job_id":"ce6eb597-c90d-443f-b655-d65e5dcbcc00","html_url":"https://github.com/lbirkert/three-body-problem","commit_stats":null,"previous_names":["lbirkert/3_body_problem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lbirkert/three-body-problem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbirkert%2Fthree-body-problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbirkert%2Fthree-body-problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbirkert%2Fthree-body-problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbirkert%2Fthree-body-problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbirkert","download_url":"https://codeload.github.com/lbirkert/three-body-problem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbirkert%2Fthree-body-problem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265180604,"owners_count":23723724,"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":["physics","python","simulation","three-body-problem","three-body-simulation"],"created_at":"2025-03-20T20:12:36.198Z","updated_at":"2025-07-13T17:40:30.529Z","avatar_url":"https://github.com/lbirkert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"`## 3-Body Problem ##`\n\n[\u003cimg src=\"demos/vid.gif\" alt=\"view demo\" width=\"100%\"/\u003e](demos/vid.mp4)\n\nThis one simulates the socalled three body problem,\nwhich describes the unpredictability (due to chaos) of\nnewtons laws being applied to three bodies, which are strongly\nsensitive to the initial starting conditions. The only\nexternal library it uses is pygame, all others are built into\npython itself.\n\n----\n\n`## Running ##`\n\n1. Make sure you have a new-ish version of pygame installed.\n`$ pip install pygame`\n\n2. Run the program. This will open up a new pygame window\nsimulating newtons laws on three bodies. The initial conditions\nare defined in the reset function in main.py.\n`$ python main.py`\n\n3. Try different starting conditions. You can find them in the\nreset function in main.py.\n```py\ndef reset():\n    global objects\n    objects = []\n    # try changing some of these numbers\n    #                     mass,position,velocity\n    objects.append(Object(60, (-25, 0), (0, -1)))\n    objects.append(Object(100, (20, 0), (0, 0)))\n    objects.append(Object(80, (0, 30), (3, 0)))\n```\n\n4. Hack it. The project is licensed under the MIT License and you\ncan find a copy in the LICENSE file.\n\n5. Contribute. Have made great new changes? Feel free to PR.\n\n----\n\n\u0026copy; 2024 Lucas Birkert - All Rights Reserved\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbirkert%2Fthree-body-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbirkert%2Fthree-body-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbirkert%2Fthree-body-problem/lists"}