{"id":13288305,"url":"https://github.com/andrei-g99/merging-orbits","last_synced_at":"2025-03-10T06:33:22.734Z","repository":{"id":210231203,"uuid":"724734778","full_name":"andrei-g99/merging-orbits","owner":"andrei-g99","description":"N-body gravitational simulator where object collisions are handled by a simplified body merger heuristic. GPU Acceleration with CUDA.","archived":false,"fork":false,"pushed_at":"2023-12-18T16:01:55.000Z","size":353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-19T06:34:07.101Z","etag":null,"topics":["astrophysics","gravity","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/andrei-g99.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}},"created_at":"2023-11-28T17:28:19.000Z","updated_at":"2023-12-20T16:01:01.583Z","dependencies_parsed_at":"2023-12-20T16:13:02.702Z","dependency_job_id":null,"html_url":"https://github.com/andrei-g99/merging-orbits","commit_stats":null,"previous_names":["andrei-g99/merging-orbits"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-g99%2Fmerging-orbits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-g99%2Fmerging-orbits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-g99%2Fmerging-orbits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-g99%2Fmerging-orbits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrei-g99","download_url":"https://codeload.github.com/andrei-g99/merging-orbits/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242805420,"owners_count":20187995,"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":["astrophysics","gravity","simulation"],"created_at":"2024-07-29T16:56:17.711Z","updated_at":"2025-03-10T06:33:22.351Z","avatar_url":"https://github.com/andrei-g99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# merging-orbits\nN-body gravitational simulator where object collisions are handled by a simplified body merger heuristic.\n\n# Basic setup\n- Install Anaconda3 on your system\n- Create a new conda virtual environment with Python version 3.10:\n\n(or you can create a new project with PyCharm and select Conda as your interpreter, it will automatically create a new conda env) \n\n(If using windows powershell first run `conda init powershell`, restart the shell and try to activate the env)\n\n`! The current latest compatible version of Python is v3.10 !`\n```bash\nconda create -n merging_orbits_env python=3.10\nconda activate merging_orbits_env\n```\n\n- Install all dependencies with PIP:\n\n```bash\npip install vtk\npip install numpy\npip install Pandas\npip install moviepy\npip install mayavi\n```\n\n# Optional setup for the GPU accelerated version only\n\nFor the GPU accelerated version you must have an NVIDIA GPU with CUDA API version 11 support. [NVIDIA CUDA Toolkit DOWNLOAD](https://developer.nvidia.com/cuda-toolkit)\n- Download version 11 for your architecture\n- Reboot your system\n- Activate the conda env again and install the pycuda python library\n```\npip install pycuda\n```\n\n( if you don't have Visual Studio installed you need to install it for the NVCC compiler and cl tool - install with the C/C++ toolkit - and remember to add the cl.exe directory C:\\Program Files\\Microsoft Visual Studio\\2022\\\u003cyourversion\u003e\\VC\\Tools\\MSVC\\\u003cyourversion\u003e\\bin\\Hostx64\\x64 to PATH )\n\n- For the accelerated version run the `simulator_accel.py` script\n\n# How to run a simulation\n- Set the initial conditions and rendering options in **config.json**\n- Run **simulator.py** (**simulator_accel.py** for the GPU accelerated version)\n- Run **render.py**\n\n# To do list\n- [ ] Implement Barnes-Hut algorithm with octree\n- [ ] Implement a 3D spatial partitioning strategy to speed up the collision handling/detection\n- [x] GPU Acceleration with CUDA\n\n# Gallery\n\n![Demo](https://github.com/andrei-g99/andrei-g99.github.io/blob/main/mergingorbits.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-g99%2Fmerging-orbits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrei-g99%2Fmerging-orbits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-g99%2Fmerging-orbits/lists"}