Hi.
Given
(A) a constant 3D vector of (0,1, 0)
(B) any normalized 3D vector
How would I calculate the 3x3 rotation matrix that when used to transform (A) will result in (B).
Thanks in Advance!
We get it. We use ad blockers too. But GameDev.net displays them so we can continue to be a great platform for you.
Please whitelist GameDev.net and our advertisers.
Also consider a GDNet+ Pro subscription to remove all ads from GameDev.net.
Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 03 January 2013 - 06:30 PM
Hi.
Given
(A) a constant 3D vector of (0,1, 0)
(B) any normalized 3D vector
How would I calculate the 3x3 rotation matrix that when used to transform (A) will result in (B).
Thanks in Advance!
Posted 03 January 2013 - 06:44 PM
Just a thought: Transform A and B into spherical coordinates, find their difference, and now you know the theta and phi rotations that must be applied to A to get B. Use theta and phi to create a 3x3 rotation matrix. There might be a better way, but that's what I'm thinking of off the top of my head.
Since A is fixed and known, you should be able to simplify it further.
Edited by Cornstalks, 03 January 2013 - 06:45 PM.
Posted 03 January 2013 - 07:02 PM
Edited by max343, 03 January 2013 - 07:03 PM.
Posted 04 January 2013 - 07:34 AM
Edited by quasar3d, 04 January 2013 - 07:54 AM.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.