Commit graph

9 commits

Author SHA1 Message Date
Bill Currie
68ca8c7016 [gatest] Switch to using e0 for the null vector
According to enki (bivector community) when there are more than one null
vector in a geometry, usually all vectors are null, and it was what to
do with multiple null vectors that caused me to balk at using e0 for the
null vector. However, using e0 for the null vector makes life much
easier, especially as that's what most of the literature does. There
are plenty of places, particularly in layout handling, that still need
adjustment for the change, but things seem to work (minus duals, but
they were broken in the first place, thus the discussion with enki).
2023-06-08 12:56:23 +09:00
Bill Currie
d0e2c0a9d9 [gatest] Allow specifying the algebra on the command line
Saves having to recompile for a different algebra. Right now, just
`-a p,m,z` is supported.
2023-05-29 15:14:59 +09:00
Bill Currie
65764a06c0 [gatest] Don't lex . as a single character
Lexing . as a single character makes it impossible to enter fractions.
Unfortunately, this means that . as dot product requires white space on
either side.
2023-05-29 15:13:27 +09:00
Bill Currie
681629a5d1 [gatest] Parse division and dual operations 2023-05-29 09:52:10 +09:00
Bill Currie
4e441d359a [gatest] Write a simple parser for playing with GA
Currently only PGA(3) is supported, but that's because the parser is
rather simple (recursive descent with a lame lexer), but it works well
enough for playing with geometric algebra without having to recompile
every time.
2023-05-27 12:47:33 +09:00
Bill Currie
b9cff7aae0 [gatest] Implement and use multi-vector reverse
This gives the resultant point the correct sign.  Though the projective
divide would take care of the sign, this makes reading the point a
little less confusing (still need to sort out automatic blade reversals
for the likes of e31).
2023-05-24 18:25:47 +09:00
Bill Currie
d01fc27dd5 [gatest] Remove the workarounds for array lifetime
Now that arrays work well enough for this case, no point in having the
workarounds (other than they're actually faster, but I'd like to
optimize *that* sometime).
2023-05-21 22:20:38 +09:00
Bill Currie
008a64ee9b [gatest] Add multivector constructors to Algebra
This makes it much easier to create vectors of a specific grade or
grouping. It even found some mistakes in the multivector product
implementations.
2023-05-19 11:15:29 +09:00
Bill Currie
c1c77bd64a [gatest] Add basic geometric algebra test
This is for developing methods of implementing geometric algebra and
eventually playing with it visually.
2023-05-19 00:34:05 +09:00