Jump to content
  • Advertisement
Sign in to follow this  
kirenemook12

calculate the new position after rotation

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

hello everyone.


if you know a 3D points coordinates, and then rotate that point around the point(0,0,0)(so that the distance to the center point stays the same), how do you then calculate the new coordinates?

Share this post


Link to post
Share on other sites
Advertisement

hello everyone.


if you know a 3D points coordinates, and then rotate that point around the point(0,0,0)(so that the distance to the center point stays the same), how do you then calculate the new coordinates?


The new coordinates should be the result of whatever rotation method you are using. How are you performing the rotation?

Share this post


Link to post
Share on other sites

the rotation is around the Z axis, the Y axis, and the X axis. I hope this is clear enough.

The question is how the rotation is represented. The typical representation is a matrix, so that the rotation is performed as a vector by matrix multiplication resulting in a another vector. It is also possible to use a representation as quaternion directly. Other representations need a conversion first (like an axis-angle pair, AFAIK).

Share this post


Link to post
Share on other sites

i am not good at this kind of math, but i guess i am using Euler Angles.

Euler Angles is a representation rotations where 3 angles are given and the order of 3 specific axes of rotation is defined. This is not well suited for application. Hence it is usual to convert each particular of the 3 axis/angle pairs of the Euler Angles to the corresponding matrix representation and multiply all 3 matrices to yield in the combined rotation. Then multiply the position vector and the rotation matrix as already mentioned.

The are some caveats when doing so: E.g. you have to define whether positive angles mean to rotate CW or CCW w.r.t. the axis of rotation, and you have to define whether you use row or column vectors, because that has an influence on the matrix layout as well as on the order of matrices when multiplying them. Look e.g. this section on wikipedia.

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!