Original Post
🔒 Locked
direction from angles
Advertisement
Quote:1. Build a rotation matrix from the Euler angles
Original post by travis08
The should be a simple one.
I've got a: a unit vector pointing -1 down Y
and b: three xyz rotation angles.
I want to rotate my initialized vector by the three angles, resulting in a new direction.
2. Apply the rotation matrix to the vector (0, -1, 0)
Note that if the input vector is a cardinal basis vector (which it is in your case), you can simply extract the desired direction vector directly from the matrix.
Post back if you need more details.
jyk, thanks for the reply.
Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?
I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.
Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?
I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.
Quote:That's correct.
Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix?
Quote:Can you describe the problems you're seeing? In what way are the results incorrect?
I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.
There are a number of places that errors could be introduced (for example, missing or misplaced degree/radian conversions, using the wrong vector notation, discrepancies in Euler-angle order, etc.). If you really get stuck, you might post some code.
After a degree to radian conversion all is well. Thanks very much jyk, I really appreciate the help.
Quote:
Original post by jyk Quote:That's correct.
Just so I'm clear: I am building a rot matrix from the angles, after which I am simply multiplying/transforming my initialized vector by the matrix? Quote:Can you describe the problems you're seeing? In what way are the results incorrect?
I'm testing this and am getting something close to what I want, but not quite. Want to make sure I'm understanding correctly.
There are a number of places that errors could be introduced (for example, missing or misplaced degree/radian conversions, using the wrong vector notation, discrepancies in Euler-angle order, etc.). If you really get stuck, you might post some code.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement