{"id":42260058,"url":"https://github.com/alisyaifudin/bima","last_synced_at":"2026-01-27T06:03:26.260Z","repository":{"id":324480554,"uuid":"1095782151","full_name":"Alisyaifudin/bima","owner":"Alisyaifudin","description":"N-body simulation powered by Rust","archived":false,"fork":false,"pushed_at":"2025-11-23T16:06:02.000Z","size":818,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-23T17:22:25.274Z","etag":null,"topics":["nbody","rust","simulation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/bima/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alisyaifudin.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T14:10:35.000Z","updated_at":"2025-11-23T16:02:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Alisyaifudin/bima","commit_stats":null,"previous_names":["alisyaifudin/bima"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Alisyaifudin/bima","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alisyaifudin%2Fbima","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alisyaifudin%2Fbima/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alisyaifudin%2Fbima/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alisyaifudin%2Fbima/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alisyaifudin","download_url":"https://codeload.github.com/Alisyaifudin/bima/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alisyaifudin%2Fbima/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28805354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T05:43:52.625Z","status":"ssl_error","status_checked_at":"2026-01-27T05:43:48.957Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nbody","rust","simulation"],"created_at":"2026-01-27T06:03:17.760Z","updated_at":"2026-01-27T06:03:26.254Z","avatar_url":"https://github.com/Alisyaifudin.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"N-body simulation library in Rust with Python bindings.\n\n# Features\n- [-] Integrators:\n  - [x] Euler\n  - [x] Runge-Kutta 4\n  - [x] Bulirsch-Stoer\n  - [x]Leapfrog (Symplectic)\n  - [ ] Wisdom-Holman\n- [ ] Adaptive time stepping.\n- [ ] Collision detection and handling.\n  - [ ] Solid body collisions.\n  - [ ] Merging bodies.\n- [-] Close encounter detection.\n  - [x] Softening.\n  - [x] Truncated.\n  - [ ] Regularization.\n- [ ] Force calculation.\n  - [x] Direct summation.\n  - [ ] Barnes-Hut tree (octree).\n  - [ ] Fast multipole method.\n- [ ] Parallelization.\n  - [ ] CPU multi-threading.\n  - [ ] GPU acceleration.\n\n# Installation\n```bash\npip install bima\n```\n\n# Quick Start\n\n```python\nfrom bima.body import Body\nfrom bima import Config\nimport numpy as np\nimport bima\nfrom matplotlib import pyplot as plt\n\nv = np.sqrt(2)\narr = np.array([[1, -1, 0, 0, 0, -2/3 * v, 0], [2, 0.5, 0, 0, 0, 1/3 * v, 0]])\ninitial = bima.Initial.from_arr(arr)\n\nconfig = Config(\n    force=bima.ForceMethod.Direct,\n    # integrator=bima.Integrator.Euler,\n    integrator=bima.Integrator.LeapFrog,\n    timestep=bima.TimestepMethod.Constant(0.1),\n    # timestep=bima.TimestepMethod.Constant(1),\n    close_encounter=bima.CloseEncounterMethod.Regularized,\n)\n\nsim = bima.Simulation(initial)\n\nbodies = sim.in_memory.run(config, 100)\n# bodies = sim.in_memory.run(config, 1)\n\n# print(len(energy.t))\n\n\ndef plot(bodies: list[Body]):\n    body0 = bodies[0]\n    length = len(body0)\n    sample_n = np.min([1000, length])\n    skip = length//sample_n\n    x0 = body0.x[::skip]\n    y0 = body0.y[::skip]\n\n    body1 = bodies[1]\n    length = len(body1)\n    skip = length//sample_n\n    x1 = body1.x[::skip]\n    y1 = body1.y[::skip]\n\n    fig, ax = plt.subplots()\n    ax.plot(x0, y0)\n    ax.scatter(x0[-1], y0[-1])\n    ax.plot(x1, y1)\n    ax.scatter(x1[-1], y1[-1])\n    ax.set_aspect(\"equal\")\n    plt.show()\n\n\n# plot(bodies)\n\nenergy = bima.Energy.from_bodies(bodies)\ne0 = energy.e[0]\nplt.plot(energy.t, (e0-energy.e)/e0)\nplt.show()\n```\n\n\n# License\nGNU General Public License v3.0. See LICENSE for more details.\n\n# Documentation\n\nunder construction","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisyaifudin%2Fbima","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisyaifudin%2Fbima","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisyaifudin%2Fbima/lists"}