Live data from Hacker News

Let's remove Quaternions from every 3D Engine

marctenbosch.com

61–70 of 184 posts

Re: Let's remove Quaternions from every 3D Engine

#61

I do love Geometric Albegra and hope it gets further adoption. In my field (physics), the project of moving to geometric algebra currently looks hopeless due to the inertia of other formalisms and lack of interest from established physicists. The real shame is that the best opportunity to introduce physicists to geometric algebra was a hundred years ago when we were first discovering spinors. First the Pauli algebra…

Not “meh, good enough” but rather “eh, computationally equivalent, why bother reformulating something that looks like a black box but is actually a gimmick we can rely upon to give equivalent results and that is understood by everybody in the field?”

Re: Let's remove Quaternions from every 3D Engine

#63

So I have a layman's question: 3blue1brown and Ben Eater did a quaternion visualization set of videos. And they said it was good because it avoided an an axis lock thing that happens when x y z rotate. He said there were maybe some errors with other models as well. So I guess the question is "does this also not have the locking axis problem?" I think it's called gimbal lock?

Unit quaternions are isomorphic to rotors, so there’s no practical difference between the two. The difference is how you introduce the concept of 3d rotation: the “traditional” way is to introduce quaternions with i^2 = j^2 = k^2 = -1, and then do some handwaving to convince the reader that they are good for 3d rotations. The bivector formalism is more natural and needs no handwaving.

Thank you! I am really starting webgl, opengl study, and so I am hoping to start on the right footing. I was beginning those quaternion videos, but I think it will benefit me to look closely here too!

Re: Let's remove Quaternions from every 3D Engine

#64

So I have a layman's question: 3blue1brown and Ben Eater did a quaternion visualization set of videos. And they said it was good because it avoided an an axis lock thing that happens when x y z rotate. He said there were maybe some errors with other models as well. So I guess the question is "does this also not have the locking axis problem?" I think it's called gimbal lock?

Just in case it's not obvious to all, this "axis lock thing" you speak of is so important it could cause a plane to crash! :) (it has implications beyond computer graphics).

Oh wow! I never considered that.

Re: Let's remove Quaternions from every 3D Engine

#65

Earlier quoted context omitted.

> On the other hand, find a problem where geometric algebra gets you to a useful insight in a quicker or more natural way and few will object to treating it in that language. I would argue that E&M and anything involving rotations (or Lorenzt boosts!) are two great examples where GA is miles ahead of anything other than differential forms but still has modest advantages of differential forms as well. The main advanta…

I think that last point really needs to start with a thorough reform of basic mathematical education (starting from undergrad calculus) to have any chance of real success. The present mish-mash of notations, however disjointed, lends itself very well to teaching people who don't know much beyond basic real analysis and differential equations. You can't just throw them in a GA-based E&M class without completely changi…

> You can't just throw them in a GA-based E&M class without completely changing the entire curriculum first.

Preparing for the additional requirements of the lectures of the coming semester is whar the semester break is for.

Re: Let's remove Quaternions from every 3D Engine

#66

When just implementing a first person type control/viewport I found it way easier to just use euler angles and the gimbal lock didn't really feel unnatural to me. So I think there is something to the idea that maybe you don't even need the complexity of quaternions at all dependent on the usecase.

But once you are in gimbal lock, what do you do?

Any rotation around the unaligned axis will free you. The problem with gimbal lock for 1st person controls is mostly avoided because roll is limited and you don't need to smoothly rotate over the poles anyways.

But, I find that I often need smooth, arbitrary rotations for other things, so I just use quaternions everywhere. When using Euler angles as input, I immediately convert them to quaternions.

Re: Let's remove Quaternions from every 3D Engine

#68

I use quaternions at work (AVs) and used them in physics and astronomy in school. The math he's talking about is darned close to the math done behind the scences with quaternions, it's just easier to grasp because it has visual references. Thing is, you only need to understand the math once to be able to use any of this stuff, and there's nothing wrong with taking it for granted after that. Either method is good enou…

I take easy to understand and easy to use over that any day. But hey, I also was a teacher once so I'm probably biased here.

Re: Let's remove Quaternions from every 3D Engine

#70
post #65

Earlier quoted context omitted.

I think that last point really needs to start with a thorough reform of basic mathematical education (starting from undergrad calculus) to have any chance of real success. The present mish-mash of notations, however disjointed, lends itself very well to teaching people who don't know much beyond basic real analysis and differential equations. You can't just throw them in a GA-based E&M class without completely changi…

> You can't just throw them in a GA-based E&M class without completely changing the entire curriculum first. Preparing for the additional requirements of the lectures of the coming semester is whar the semester break is for.

Sure, as long as you don't expect anyone to complete the course or are willing to play catch up for most of the semester. In other words, I'd love to plan courses that way, but no university administrator would ever let me (instead I restrict myself to graduate seminars and beyond).
Post reply on HN