{"id":27091456,"url":"https://github.com/avitase/libgravix2","last_synced_at":"2025-04-06T07:38:24.080Z","repository":{"id":47985907,"uuid":"446816686","full_name":"avitase/libgravix2","owner":"avitase","description":"A fast yet precise simulation of conservative, attractive forces acting on point-like particles embedded onto the surface of a unit sphere.","archived":false,"fork":false,"pushed_at":"2023-08-17T12:21:30.000Z","size":6901,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-08-17T14:05:53.839Z","etag":null,"topics":["c-api","ode","ode-solver","simulation","symplectic-integrator"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/avitase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-11T12:41:59.000Z","updated_at":"2023-08-17T14:05:53.839Z","dependencies_parsed_at":"2022-08-12T15:52:24.293Z","dependency_job_id":null,"html_url":"https://github.com/avitase/libgravix2","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitase%2Flibgravix2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitase%2Flibgravix2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitase%2Flibgravix2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitase%2Flibgravix2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avitase","download_url":"https://codeload.github.com/avitase/libgravix2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451566,"owners_count":20940946,"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":["c-api","ode","ode-solver","simulation","symplectic-integrator"],"created_at":"2025-04-06T07:38:23.430Z","updated_at":"2025-04-06T07:38:24.074Z","avatar_url":"https://github.com/avitase.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libgravix2 🌎🚀\n\n[![Build docs](https://github.com/avitase/libgravix2/actions/workflows/build_docs.yml/badge.svg)](https://avitase.github.io/libgravix2/)\n[![Unit tests](https://github.com/avitase/libgravix2/actions/workflows/validate.yml/badge.svg)](https://app.codecov.io/gh/avitase/libgravix2)\n[![Test coverage](https://codecov.io/gh/avitase/libgravix2/branch/main/graph/badge.svg?token=EGGI4HU1K2)](https://app.codecov.io/gh/avitase/libgravix2)\n\nA fast yet precise simulation of conservative, attractive forces acting on point-like particles embedded onto the surface of a unit sphere.\nThe force fields are generated by static points that are embedded on the surface of the same unit sphere.\nWe implement different symmetric and symplectic integrators and expose a simple C-API to generate and propagate particles.\n\nThis library is meant to be a physics engine for small games where, e.g., _missiles_ fly in the gravitational force fields of _planets_ in a curved universe.\nIt is fast, lightweight, and lends itself perfectly to be spawned in many concurrent instances.\n\n## 🚧 WORK IN PROGRESS 🚧\nThis is all work in progress and any help is highly appreciated.\nIf you find any bugs or want to improve the documentation, please [submit a pull request](https://github.com/avitase/libgravix2/pulls) or [open an issue](https://github.com/avitase/libgravix2/issues).\nThere are already open issues, and you can help to close them!\n\nIf you plan to contribute, please read the [CONTRIBUTING](CONTRIBUTING.md) guide.\n\n## Documentation\nFind the documentation of our C-API here: [avitase.github.io/libgravix2/](https://avitase.github.io/libgravix2/) \n\nFurthermore, our C-API can easily be wrapped in high-level languages.\nFor example, we provide a minimalistic Python binding here: [avitase.github.io/libgravix2/py-bindings/](https://avitase.github.io/libgravix2/py-bindings/) and use it to showcase a few simple applications in a [Jupyter notebook](bindings/python/example.ipynb).\n\n## How to build\nThis is a C library with (almost) no external dependencies, except for:\n - C mathematical operations from `math.h`, e.g., `libm.so.6`\n - Standard C library, e.g., `libc.so.6`\n - that's all\n\nBuilding is straightforward with [`cmake`](https://cmake.org) and its predefined [CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html):\n\n```\nlibgravix2 $ cmake --preset=release\n[...]\n-- Configuring done\n-- Generating done\n-- Build files have been written to: build/release\nlibgravix2 $ cmake --build build/release\n```\nYou'll now find the shared library under `build/release/libgravix2.so`.\nIf you want to install the library system-wide, you can either copy this (and the other generated files) from the build directory manually or use CMake to install them automatically.\n```\nlibgravix2 $ cmake --install build/release\n```\nIf you prefer to find the files in non-default locations you have to set `CMAKE_INSTALL_PREFIX` during configuration, e.g.,\n```\nlibgravix2 $ cmake --preset=release -DCMAKE_INSTALL_PREFIX=/some/path\nlibgravix2 $ cmake --build build/release                  # as before\nlibgravix2 $ cmake --install build/release                # as before\n```\n\nThere are more configuration options that can be set during compilation either by passing them directly via `-D` to `cmake` (as shown before with `CMAKE_INSTALL_PREFIX`) or via a graphical tool, such as [`ccmake`](https://cmake.org/cmake/help/latest/manual/ccmake.1.html):\n - `CMAKE_BUILD_TYPE`: `Release` (default) or `Debug`. If enabling unit tests, this has to be set to `Debug`.\n - `ENABLE_TESTING`: `On` or `Off` (default). Generate unit tests and require a `Debug` build. Tests can be run with `ctest` after building.\n - `ENABLE_DOXYGEN`: `On` or `Off` (default). Generate documentation and require a [Doxygen installation](https://www.doxygen.nl/index.html).\n - `GRVX_POT_TYPE`: `2D` (default) or `3D`.\n - `GRVX_N_POT`: Approximation order of the force field. Only available if `GRVX_POT_TYPE` is set to `3D`. (Default: `0`)\n - `GRVX_TRAJECTORY_SIZE`: Size of trajectory. (Default: `100`)\n - `GRVX_INT_STEPS`: Number of integration steps between trajectory points. (Default: `10`)\n - `GRVX_MIN_DIST`: Smallest allowed distance between missiles and planets. (Default: `1` degree.)\n - `GRVX_COMPOSITION_SCHEME`: `p2s1` , `p4s3` , `p4s5` , `p6s9` or `p8s15` (default).\n\nHave a look into our [documentation](https://avitase.github.io/libgravix2/) for more information about these options.\n\n## CMake package\nWe also export a CMake package upon installation to be used with the [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) command of CMake:\n\n* Package name: `libgravix2`\n* Target name: `libgravix2::libgravix2`\n\nExample usage:\n\n```cmake\nfind_package(libgravix2 REQUIRED)\n\n# Declare the imported target as a build requirement using PRIVATE, where\n# project_target is a target created in the consuming project\ntarget_link_libraries(\n    project_target PRIVATE\n    libgravix2::libgravix2\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitase%2Flibgravix2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favitase%2Flibgravix2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitase%2Flibgravix2/lists"}