Finding angles from a rotation matrix

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 5

  • @DannysMyNanny
    @DannysMyNanny 6 ปีที่แล้ว

    Bro thanks!!! Doing data structures homework and were getting into a bunch of matrix and vector math. So helpful

  • @JoshSideris
    @JoshSideris 7 ปีที่แล้ว

    Can this be done on any arbitrary 3D transformation matrix? Doesn't the order in which the rotation transforms are implemented affect the final matrix? What about matrices based on an axis given by a unit vector as follows:
    [1+(1-cos(A))*(RX*RX-1) -RZ*sin(A)+RX*RY*(1-cos(A)) RY*sin(A)+RX*RZ*(1-cos(A)) 0]
    [RZ*sin(A)+RX*RY*(1-cos(A)) 1+(1-cos(A))*(RY*RY-1) -RX*sin(A)+RY*RZ*(1-cos(A)) 0]
    [-RY*sin(A)+RX*RZ*(1-cos(A)) RX*sin(A)+RY*RZ*(1-cos(A)) 1+(1-cos(A))*(RZ*RZ-1) 0]
    [0 0 0 1]
    Where A is the angle and is your unit vector.

  • @3dprintwiz378
    @3dprintwiz378 7 ปีที่แล้ว

    Hi, would this still apply if I did a YZY rotation?

    • @jacobfarnsworth7283
      @jacobfarnsworth7283  7 ปีที่แล้ว

      On the second slide, where I have the individual matrices for rotations about each of the 3 axes, take Ry * Rz * Ry - making sure to replace theta with alpha, beta, gamma (or whatever you prefer) representing the Y rotation, Z rotation, and second Y rotation respectively - and multiply them together.
      You can then follow my logic of finding the angles in terms of the matrix elements (a,b,c,d,e,f,g,h,i) - the matrix you'll be working with will look a bit different from mine, but the logic will be more or less the same.
      Hopefully that helps.

    • @3dprintwiz378
      @3dprintwiz378 7 ปีที่แล้ว

      K, thanks for response. By the way is it possible to extract correct euler angles given just x y z coordinate of a vector. I am using as i said ZXZ rotation, and first two angles I get are correct, but the last one, which dictate the orientation of the face or object is erroneous.