Hacker News new | ask | show | jobs
by chombier 844 days ago
A somewhat simpler way of keeping track in the case of normals is to use row vectors for, well, covectors, which is what normals are anyways.

What GA brings is the ability to express linear combinations of scalars, vectors, bi-vectors ... Whether this is actually useful/desirable in practice is another story though.

2 comments

The #1 thing that GA brings is the ability to divide by vectors, which makes working many things out on paper dramatically simpler.
Yeah, but the original commenter's objection was it seems weird to, e.g. use a 6-dimensional space to represent 3-dimensional quantities.

Doing it by using vectors and covectors still requires you to keep track of 6 degrees of freedom, i.e, 6 dimensions. Eventually everybody has to pay the piper :-)

Yes, you need to keep track of which is which (most likely using the type system) but you don't risk adding vectors to covectors without converting explicitly. Each of vectors/covectors is 3 dimensions, but there is no 6-dimensional space in which vectors/covectors are allowed to mix.

IIUC this is unlike GA/exterior algebra where scalars/vectors/bi-vectors/... can be added together, just like one can add a scalar to a pure imaginary quaternion in the quaternion algebra.

> Yes, you need to keep track of which is which (most likely using the type system) but you don't risk adding vectors to covectors without converting explicitly.

Do many graphics libraries actually do this? In my experience adding points and normals directly is actually quite common.