Thanks to tutorials:
- A Swift Introduction to Geometric Algebra
- What is the Inverse of a Vector?
- Let's remove Quaternions from every 3D Engine
Representation:
- geometric algebra 3D:
:: :ga3 s x y z xy yz zx xyz - vector 3D:
:: :v3 x y z
Call geometric.core/ga3 s x y z xy yz zx xyz to construct a value.
Values:
ga3:identity-:: :ga3 1 0 0 0 0 0 0 0ga3:zero-:: :ga3 0 0 0 0 0 0 0 0
Functions:
-
ga3:as-v3 a -
ga3:as-v3-list a -
ga3:from-v3 a -
ga3:from-v3-list a -
ga3:scalar? a -
ga3:v3? a -
ga3:length a -
ga3:length-square a -
ga3:conjugate a -
ga3:normalize a -
ga3:scale a n -
ga3:add a b -
ga3:sub a b -
ga3:multiply a b -
ga3:close? a b -
ga3:reflect a r
https://github.com/calcit-lang/calcit-workflow
MIT