Skip to content

Geometric Algebra in Python

alex arsenovic edited this page Nov 13, 2017 · 7 revisions

This document outlines the development of Geometric Algebra (GA) in Python.

Motivation

Argument to create yet another GA implementation.

For engineers and scientists to make use of Geometric Algebra they require computational support for the new data-types and operations GA introduces. In recent years Python has become a dominant language in the field of scientific and engineering software development, making it a suitable language for a GA implementation.

Why python?

  1. Significant number of scientists and engineers have moved to python. (community)
  2. Python has scientific ecosystem (integration)
  3. Syntax can become readable, so code looks like the math.
  4. Python's performance problems are being solved.

Currently, there is no suitable GA module in python which supports the exploratory computing paradigm, as is generally used by scientific python community.

Desired Features

  1. Arbitrary GA's up to reasonable dimensions, like 10.

  2. Syntax must resemble math, not code. ie,

     v.rotate( Biv::xy * .25 ) # nope 
     v = R*v*~R # yep 
    
  3. Should act like the rest of exploritory computing stack numpy/scipy/pandas

  4. Installable form PyPi and conda.

  5. Performance. 8D GA's should no take 10s to instantiate. need to spec this

Context

There have historically been many GA implementations, some by mathematicians, some by computer scientists. A good outline of difficulties and methods to create GA implementation are made in "Geometric Algebra and its Application to Computer Graphics"

Also, important is Pablo Colapinto's work (available here).

Existing/Related Modules

  • clifford : this package!
  • quaternion : quaternion support for numpy. by @moble
  • pyversor : port of (python)[https://github.com/wolftype/versor] to python by @tinglest

Miscellaneous

  • Chris Doran (@chrisjdoran) has made arguments at AGACSE for using Haskel as an suitable language for GA. See https://github.com/ga , @lukeburns. an intersting feature which might be realizable in python is the lazy evaluation of objects (perhaps through use generators as return types).
Clone this wiki locally