Jump to content
• Advertisement

#### Archived

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

# multiplication counts

This topic is 5821 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

##### 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

##### 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

##### Share on other sites
quote:
Original post by lun123
Sorry, I cannot find the algorithms from google or whatever..

Click in the third link from the top on this page for your answer (the one titled "Quaternion Multiplication"):

http://www.google.com/search?q=quaternion+multiplication

If I had my way, I''d have all of you shot!

codeka.com - Just click it.

#### Share this 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

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5
• Advertisement

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633722
• Total Posts
3013550
×

## Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!