News for hackers. Stuff that matters.
Re:Let's remove Quaternions from every 3D Engine by amluto on Friday November 02, 2018 @05:35PM (#18366962)
I read through a bunch of this, and one part seems poorly explained. There’s a clear definition of the product of two vectors, but the result isn’t a vector — it’s a scalar plus a bivector. Then, by magic, three vectors get multiplied! But what does that even mean? Somehow a vector gets multiplied by a bivector, and the result is somehow still a vector.

What’s going on?

Re:Let's remove Quaternions from every 3D Engine by pfedak on Friday November 02, 2018 @06:49PM (#18367358)
As pointed out in that aside, the general vector-bivector multiplication isn't needed to evaluate the reflection case, but I agree it's a little unsatisfying to sweep that under the rug.

You can work everything out by breaking it down to the unit basis vectors, for which the products are explicit. One way of writing it, which feels more comfortable to me possibly at the expense of being the "wrong" sort of intuition, is

u(v^w) = (u.v)w - v(u.w) + u^v^w

(using . for inner product and ^ for outer product). I guess you can also think of the first two terms as the rule for taking the inner product of a vector and a wedge product, though I haven't thought through this completely.

Because of the repeated vector in the reflection formula, that last trivector vanishes, so the result is just a vector, as it will be whenever the vector is coplanar with the bivector.

Re:Let's remove Quaternions from every 3D Engine by marctenbosch on Friday November 02, 2018 @05:52PM (#18367066)
The [Aside] section of "The Reflection Formula (Geometric Product Version) "http://marctenbosch.com/quaternions/#h_13 has the answer you seek ;)
Re:Let's remove Quaternions from every 3D Engine by amluto on Friday November 02, 2018 @11:32PM (#18368520)
I read that a couple times. I found it unsatisfying because you are dropping terms that happen to have a coefficient of zero without a clear explanation of how those terms are even well formed in the first place.

I suppose this could be answered if you explicitly stated what set the geometric product acted on. As a guess, and from skimming Wikipedia, it’s the direct sum of scalars, vectors, bivectors, etc, up through n-vectors. So 2 + x∧y + 3x∧y∧z is a valid output. And it’s probably straightforward to show that the geometric product is actually defined on this space.

(Hi Marc!)

Re:Let's remove Quaternions from every 3D Engine by marctenbosch on Saturday November 03, 2018 @02:26AM (#18369009)
Ok I understand your question better, might update the article. Like the other commenter said, you can keep applying the geometric product more than once. To find what happens you can just work with the basis vectors.

So, you basically have three case: x (xx) = x (1) = x -> a vector

x (xy) = x (x.y + x^y) = x (x.y) + xxy = x (x.y) + y -> a vector

x (yz) = x (y.z + x^y) = x (y.z) + xyz -> a vector + a trivector. This only happens if the three vectors are independent, which can never be the case for -ava