A Geometric Algebra package for Unity!
The paper accompanying this package received the Best Paper & Presentation Award and the Best Application Award at the CGI 2024, ENGAGE Workshop. You may read the preprint of the paper here.
- Clone the repository:
git clone https://github.com/papagiannakis/GA-Unity
- Navigate to the
GA_Unity/unity-project
directory inside the cloned repository. - Open Unity Hub and add the project. Make sure you use Unity version 2022.3 or above.
- Open the
SampleScene.unity
from the Scenes folder to start.
unity-project/
├── ProjectSettings/
├── Packages/
├── Assets/
│ ├── Scripts/
│ │ ├── R410Pool.cs
│ │ ├── R410_Helper.cs
│ │ ├── MultiVectorLerp.cs
│ ├── Scenes/
│ │ ├── SampleScene.unity
│ ├── Materials/
- R410.cs: Originally generated by Ganja.js, contains basic multivector class for CGA, along with basic methods such as scalar multiplication, conjugate, and geometric/inner/outer product. Also includes basic functions to extract transformation information from translators, rotors and dilators, as well as perform linear multivector interpolation.
- R410_Helper.cs: Used to increase performance by exposing basis elements outside R410, as a single reference object. Contains functions that constructs commonly used multivectors such as translators, rotors and dilations as well as objects such as points or spheres.
- R410_pool.cs: Creates a single reference object that is used to allocate an extensible pool of multivectors that are used throughout the interpolation phase. Using multivectors from the pool, and returning them back once no longer needed, allows avoiding dynamic allocation of memory and increases performance.
If you are using the GA-Unity, please cite:
@article{GAUnity,
title={GA-Unity: A Production-Ready Unity Package for Seamless Integration of Geometric Algebra in Networked Collaborative Applications},
url={http://arxiv.org/abs/2406.11560},
DOI={10.48550/arXiv.2406.11560},
note={arXiv:2406.11560 [cs]},
number={arXiv:2406.11560},
publisher={arXiv},
author={Kamarianakis, Manos and Lydatakis, Nick and Papagiannakis, George},
year={2024},
month=jun
}