Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm confused—the author keeps referring to rotations. The very first sentence is "To represent 3D rotations graphics programmers use Quaternions", even. But I don't think you don't need quaternions to represent 3D rotations. You need quaternions to represent translations, because translations aren't linear functions in 3D. (To be a linear function, v * 0 = 0, but that isn't true for translations). My understanding was that the extra dimension was to be able to represent translations. Am I mistaken?


Yes, you are mistaken. You need 3 dimensions to represent a 3D rotation (2 for picking an axis, plus one for picking an angle). To represent translations and rotations together, you need 6 dimensions.

This also shows that the talk of needing to visualize 4d to understand quaternions is disingenuous. The formula for using a quaternion to rotate a vector is qvq^-1, from which it is immediate that changing the length of a quaternion does not change the rotation it represents. So you can just deal with unit-length quaternions, which form a 3D space.


Hmm, I seem to be mixing up using 4d linear operations (ie, a 4x4 matrix) to represent translation, rotation, scaling, etc, with their combinations, with representing a rotation itself. Thanks for your help—I'll dig more into this.


You don't need to restrict yourself to mathematically-nice algebras of operations or whatever if you're doing 3d graphics though. If you want to represent a translation of x by vector v in 3D, just do x+v.


Well, linear functions have the nice ability to be composed together, resulting in another linear function (which can then be composed, etc).


Computable functions have that same property, and that's the space that programs work in. It doesn't matter if the composition elements are linear, only that they can be computed on your hardware within some time budget.


I wonder if you're getting confused with what is called "a dual quaternion" which has 8 basis elements, and can represent both a translation and a rotation.


Doing some reading, I seem to be mixing this up with https://gamedev.stackexchange.com/questions/72044/why-do-we-.... The later bit I understand, but I think it shows I don't really get what this article is all about. I'll have to read it further. Thank you :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: