6 ms·
When did you use quaternions? (Genuinely curious!)
by JadeNB 12y ago
When did you use quaternions? (Genuinely curious!)
- dottrap 12y agoQuaternions are pretty common in 3D graphics.
- jws 12y agoMinecraft-like game I wrote with my daughter. I discovered their use the hard way after having suffered through without them. Any time you are freely rotating a viewpoint or an object in 3D space, you will probably want quaternions. Do write some good test cases though that compare to someone else's implementation. I accidentally wrote my multiplication backwards and didn't catch it for a long time. I just had a vague feeling that something was wrong every time I wrote rotation code.
- kephra 12y agoQuarternions are much easier then the typical vector arithmetic, that is used by OpenGL ES. Linden Scripting Language even provides quarternions conversion with llEuler2Rot, llRot2Euler and llAxisAngle2Rot. See: http://wiki.secondlife.com/wiki/Quaternion http://wiki.secondlife.com/wiki/Quaternion for an introduction. So quaternions are useful for 3d games, and games are a hot topic for Lua. But its not required, that complex numbers or quarternions are part of base language. See: http://lua-users.org/wiki/ComplexNumbers http://lua-users.org/wiki/ComplexNumbers - thats easy to implement with Lua prototyping.