Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

lun123

multiplication counts

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I saw somewhere in gamedev.net: (1) 2 unit quaternions can be multiplied straightforwardly with only 12 multiplications (2) multiply 2 3x3 rotation matrices require less than 27 multiplications Is that true? What is the fastest general way for multiplying 2 quat''s and 2 rotation matrices?

Share this post


Link to post
Share on other sites
Advertisement
as far as i remember, thats true..

as rotation matrices and unit quaternions are equal, i think you get the idea why you should use quaternions if you have complex rotational/orientation problems (say kinematics in general)..

for infos on how to do it.. you know the searchengine of this forum: www.google.com

finds everything

"take a look around" - limp bizkit
www.google.com

Share this post


Link to post
Share on other sites
Sorry, I cannot find the algorithms from google or whatever..

I really don''t know how come multiplying 2 quat can take < 16 multiplications. Could someone give a link or solution?

Share this post


Link to post
Share on other sites
There''s:

this page (further down the list of Dean Harding''s search). From this page:

"With this method You get 7 less multiplications, but 15 more
additions/subtractions. Generally, this is still an improvement."

But on today''s proccessors (the article is dated 1994)multiplication and addition are generally just as fast, so a method that reduces the number of multiplications by adding even more additions/subtractions will generally be worse. Plus it uses a lot of intermediate variables which might also slow it down.

For UNIT quaternions you could also use the fact that the result must be a unit quaternion and so have x^2 + y^2 + x^2 + w^2 = 1. From this you can work out (e.g.) w from x, y and z, but it will generally be even slower unless you can calculate squares and square roots very quickly.




Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!