Jump to content
  • Advertisement
Sign in to follow this  
boxdot3

rotation matrix

This topic is 4256 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.

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!