Quaternions and their exponential form

Quaternions and their exponential form

Postby msdubov » 28 May 2011, 19:30

Hi,


I've just started working with quaternions and have already managed to get it working to perform various kinds of rotations. The main operation that I use both for calculating rotations and for their combining is, of course, the standard quaternion multiplication which takes 16 scalar multiplications and 12 scalar additions.

I've also heard, that a lot operations with quaternions may be optimized by using their exponential form (here, for example) and some "substitute" for the Euler's formula which is working for quaternions (here). It turned out for me, however, to be a problem to find concrete examples of how to use it in code. I've only found that the formula is mostly used for performing interpolations (but no examples of it either).

So, my questions are: can anyone tell if there is a real use of such things in 3D-programming, and, if yes, are there any ways for me to use it if there are no interpolations in my game (I'm rotating moons around the planets of the solar system, so that is just useless)?

Thanks a lot!
msdubov
 
Posts: 1
Joined: 28 May 2011, 19:28

Re: Quaternions and their exponential form

Postby MyEmail » 02 Aug 2011, 19:41

A) if your code works don't touch it unless you have too. Premature optimizations can waste vast amounts of dev-time, and introduce scores of unforseable bugs that won't manifest themselves till later stages in development (when they become a really, really big problem).
B) There is a md5-model viewer (opengl) that implements what you seek. (google to the rescue!)
MyEmail
 
Posts: 107
Joined: 06 Jul 2011, 08:58

Who is online

Users browsing this forum: No registered users and 1 guest

cron