Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moble/spacetimealgebra
The geometric algebra of spacetime, now with python!
https://github.com/moble/spacetimealgebra
Last synced: about 1 month ago
JSON representation
The geometric algebra of spacetime, now with python!
- Host: GitHub
- URL: https://github.com/moble/spacetimealgebra
- Owner: moble
- License: mit
- Created: 2014-03-04T20:45:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-01T21:33:03.000Z (over 10 years ago)
- Last Synced: 2024-10-15T01:25:24.398Z (3 months ago)
- Language: C++
- Size: 328 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SpacetimeAlgebra
================The geometric algebra of spacetime, now with `c++` *and* `python`!
***NB:*** The current exponential function, as output by Gaigen 2.5,
is wrong in some cases. It appears to be safe for bivector blades,
but it is not safe for general bivectors. In particular, it appears
that anything that should result in a pseudoscalar component is wrong.
I expect that similar errors are also present in the sin, cos, sinh,
and cosh functions.This collection of code contains C++ and python interfaces to code
expressing the geometric algebra of spacetime. The core of this code
is generated by the excellent
[Gaigen](http://staff.science.uva.nl/~fontijne/g25.html) package,
while the interface is provided via [Cython](http://cython.org/), which gives us all the advantages of `c++` speed, with the friendly interactivity of python. Either interface is, of course, usable. In particular, this code can be used directly in `c++` code, or in `python` code, and every effort is made to ensure that the functions to be called have the same names, and the syntax is as identical as possible.To compile and use this code in a `c++` project, nothing external should be required (beyond a reasonable compiler). To use this code in `python`, or relatively recent installation of `python` is required, along with `cython`. [Cython can usually be installed easily via the command line as `pip install Cython`.]
While the code can be used as is, it may be desirable to change something at a very low level. Because most of the code is generated automatically, this requires the user to have the code-generating tools installed. They include
* [Gaigen](http://staff.science.uva.nl/~fontijne/g25.html)
* [Cython](http://cython.org/)
* [Saxon](http://saxon.sourceforge.net/)Again, however, these are not necessary for most purposes.
Note that the best documentation about wrapping `c++` libraries for python
with cython is not obvious to find, but is
[here](http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html).