{"id":24310309,"url":"https://github.com/daodavid/gravity-simulation","last_synced_at":"2025-07-22T09:09:57.076Z","repository":{"id":48978666,"uuid":"189186389","full_name":"daodavid/gravity-simulation","owner":"daodavid","description":"Python package  for calculation and simulation of n-bodies interaction.","archived":false,"fork":false,"pushed_at":"2023-04-20T19:36:22.000Z","size":205853,"stargazers_count":28,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-07-01T13:54:05.219Z","etag":null,"topics":["gravity","gravity-simulator","guvectorize","leap-frog-optimizer","leapfrog","mechanics","n-body-simulator","numba","numpy","nutonmotions","python","quadtree"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/daodavid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-29T08:46:16.000Z","updated_at":"2025-05-01T03:55:20.000Z","dependencies_parsed_at":"2022-08-30T05:41:53.529Z","dependency_job_id":null,"html_url":"https://github.com/daodavid/gravity-simulation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daodavid/gravity-simulation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daodavid%2Fgravity-simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daodavid%2Fgravity-simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daodavid%2Fgravity-simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daodavid%2Fgravity-simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daodavid","download_url":"https://codeload.github.com/daodavid/gravity-simulation/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daodavid%2Fgravity-simulation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266463506,"owners_count":23932901,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gravity","gravity-simulator","guvectorize","leap-frog-optimizer","leapfrog","mechanics","n-body-simulator","numba","numpy","nutonmotions","python","quadtree"],"created_at":"2025-01-17T06:11:11.521Z","updated_at":"2025-07-22T09:09:57.046Z","avatar_url":"https://github.com/daodavid.png","language":"HTML","readme":"\n# Gravity simulation \n### Python package  for calculation and simulation of n-bodies interaction  under  the influence of  Gravity force.Written in NumPy and Numba.\n\n  \n\u003cbr\u003e \u003cbr\u003e\n  \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/galaxy-2g.gif\"\u003e\n  \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/gift-generated-examples/b-7.gif\"\u003e\n  \n  \u003cbr\u003e \u003cbr\u003e   \n  \n### Installing : \n```\npip install gravity-simulation==2.0.1\n\n```  \n### Example : \n\n```\n#random example together with one body bigger mass than others\nfrom gravity_simulation.gravity import *\n\nfield.generate_random(15, mass=[20, 500], r=[-5, 5], velocity=[-5, 5], alpha=[0, 360])\nfield.add_body(Body(x0=0, y0=0,v_x=0, v_y=0, mass = 3000))\n\nfield.run(1300, C=0.01)\nfield.save_animation(frames=50,name='my_example',reduce_size_body=50,frames=150)\n\n```\n[more ... ](https://github.com/daodavid/gravity-simulation/tree/gh-pages/examples) \u003cbr\u003e\n[Documentation](https://github.com/daodavid/gravity-simulation/tree/gh-pages/ddocs)\n\n\n\u003cbr\u003e \u003cbr\u003e \n \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/new-gift/b_3502.gif\"\u003e\n  \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/new-gift/g-22.gif\"\u003e\n \u003cbr\u003e \u003cbr\u003e\n  \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/gift-generated-examples/b-16.gif\"\u003e\n  \u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/gift-generated-examples/b-11.gif\"\u003e  \n\u003cbr\u003e \u003cbr\u003e\n\u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/new-gift/ex49.gif\"\u003e\n\u003cimg height=\"500\" width=\"400\" src=\"https://daodavid.github.io/gravity-simulation/resources/new-gift/2b-1.gif\"\u003e\n\n\u003cbr\u003e \u003cbr\u003e\n\n#####  Nympy is an incredible library and without it, The Python is nothing (just an easy programming language and so on), but with the Numpy, The  Python is able to solve serious processes involved a huge number of iterations. When the application was written in common Python then the results were quite bad, for example, when the number of bodies is 2000 and number of the iterations is  10000 the duration of the process takes about 2 days because of the app was useless now when the processes are vectorized with \u003cmark\u003eNumPy\u003c/mark\u003e and \u003cmark\u003eNumba\u003c/mark\u003e the execution time takes about 2 hours.\n\n    \n \n   \n  \n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaodavid%2Fgravity-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaodavid%2Fgravity-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaodavid%2Fgravity-simulation/lists"}