Jump to content
  • Advertisement
Sign in to follow this  
boxdot3

rotation matrix

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

How would I go about setting up a rotation matrix to rotate a set of points that are all on one plane to be oriented onto another plane? Image Hosted by ImageShack.us The points lie on some arbitrary plane in R3 formed by the black line, and i would like to rotate them to all be oriented along the xy plane, (0,0,1). What would be the easiest way to do this?

Share this post


Link to post
Share on other sites
Advertisement
The easiest way would probably be to determine the axis-angle rotation, and then convert that to a rotation matrix. What you do is take the cross product between the plane normal and (0,0,1) to get the rotation axis, and the dot product to get the rotation angle as per the dot-product formula |a||b|cos(θ). You can then reference this page on how to create the rotation matrix. Once you get everything working, a lot of the operations can be optimized, such as the cross-product and dot-product, since you're working with a constant vector (0,0,1).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!