QUATERNION TO AXIS ANGLE      AXIS ANGLE TO QUATERNION
WHAT IS A QUATERNION4 scalar variables (sometimes known as Euler Parameters not to be confused with Euler angles)Similar with algebra process but in quaternion multiplication is not commutative.Ex. xy * zw != zw * xy
QUATERNION TO AXIS ANGLEEquations:angle = 2 * acos(qw)x = qx / sqrt(1 – qw * qw)y = qy / sqrt(1 – qw * qw)z = qz / sqrt(1 – qw * qw)
QUATERNION TO AXIS ANGLEQuaternion in terms of axis angleq = cos(angle/2) + i ( x * sin(angle/2)) + j (y * sin(angle/2)) + k ( z * sin(angle/2))
QUATERNION TO AXIS ANGLEAt angle 0 degrees?Let’s first use the quaternion to axis formulaq = cos(angle/2) + i ( x * sin(angle/2)) + j (y * sin(angle/2)) + k ( z * sin(angle/2))
QUATERNION TO AXIS ANGLEAt angle 0 degrees?So…q = cos(0/2) + i ( x * sin(0/2)) + j (y * sin(0/2)) + k ( z * sin(0/2))Then...q = 1 + i (x * 0) + j (y * 0) + k (z * 0)
QUATERNION TO AXIS ANGLEAt angle 0 degrees?q = 1working back from above equation qw = 1Angle = 2 * sqrt (1 – qw*qw)Angle = 2 * sqrt (1 – 1 * 1)Angle = 0 degrees
QUATERNION TO AXIS ANGLETry solving….A.) 180 degreesB.) 0.7071 + i0.7071
AXIS ANGLE TO QUATERNIONEquations:qx = ax * sin(angle/2)qy = ay * sin(angle/2)qz = az * sin(angle/2)qw = cos(angle/2)WHERE DID THESE EQUATIONS CAME FROM?!
AXIS ANGLE TO QUATERNIONDerivation of the equationFrom trigonometry formulacos(angle/2)2 + sin(angle/2)2 = 1
AXIS ANGLE TO QUATERNIONmultiplying the sine part by 1 = ax*ax + ay*ay + az*az will have no effect so we can write:cos(angle/2)2 + (ax*ax+ ay*ay + az*az) * sin(angle/2)2 = 1
AXIS ANGLE TO QUATERNIONExpanding the equation…cos(angle/2)2 + ax*ax * sin(angle/2)2 + ay*ay * sin(angle/2)2+ az*az * sin(angle/2)2 = 1
AXIS ANGLE TO QUATERNIONThis shows that the quaternion is normalized since it is in the form:qw2 + qx2 + qy2 +qz2 =1 is like…cos(angle/2)2 + ax*ax * sin(angle/2)2 + ay*ay * sin(angle/2)2+ az*az * sin(angle/2)2 = 1
AXIS ANGLE TO QUATERNIONqw2 + qx2 + qy2 +qz2 =1qw2 = cos(angle/2)2qx2= ax*ax * sin(angle/2)2qy2  = ay*ay * sin(angle/2)2qz2 = az*az * sin(angle/2)2
AXIS ANGLE TO QUATERNIONWhen we square the equations, the equations turned into…qw = cos(angle/2)qx= ax * sin(angle/2)qy = ay * sin(angle/2)qz= az * sin(angle/2)
AXIS ANGLE TO QUATERNIONLets try solving it…A.) Angle = 90 degrees, axis = 1, 0 , 0
AXIS ANGLE TO QUATERNIONLets try solving it…A.) Angle = 90 degrees, axis = 1, 0 , 0Use these equations:qw = cos(angle/2)qx= ax * sin(angle/2)qy = ay * sin(angle/2)qz= az * sin(angle/2)
AXIS ANGLE TO QUATERNIONSolving these…qw = cos(90/2),qx= 1 * sin(90/2)qy = 0 * sin(90/2)qz= 0 * sin(90/2)
AXIS ANGLE TO QUATERNIONqw = 0.7071qx= 0.7071qy = 0qz= 0This gives a quaternion (0.7071 + i0.7071)
QUATERNION TO AXIS ANGLE      AXIS ANGLE TO QUATERNIONGroup 4:Jameson Chu ™Robin Marcelo ™Arric Tan™
QUATERNION TO AXIS ANGLE      AXIS ANGLE TO QUATERNIONSources: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htmhttp://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htmhttp://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm

Quaternion to axis

  • 1.
    QUATERNION TO AXISANGLE AXIS ANGLE TO QUATERNION
  • 2.
    WHAT IS AQUATERNION4 scalar variables (sometimes known as Euler Parameters not to be confused with Euler angles)Similar with algebra process but in quaternion multiplication is not commutative.Ex. xy * zw != zw * xy
  • 3.
    QUATERNION TO AXISANGLEEquations:angle = 2 * acos(qw)x = qx / sqrt(1 – qw * qw)y = qy / sqrt(1 – qw * qw)z = qz / sqrt(1 – qw * qw)
  • 4.
    QUATERNION TO AXISANGLEQuaternion in terms of axis angleq = cos(angle/2) + i ( x * sin(angle/2)) + j (y * sin(angle/2)) + k ( z * sin(angle/2))
  • 5.
    QUATERNION TO AXISANGLEAt angle 0 degrees?Let’s first use the quaternion to axis formulaq = cos(angle/2) + i ( x * sin(angle/2)) + j (y * sin(angle/2)) + k ( z * sin(angle/2))
  • 6.
    QUATERNION TO AXISANGLEAt angle 0 degrees?So…q = cos(0/2) + i ( x * sin(0/2)) + j (y * sin(0/2)) + k ( z * sin(0/2))Then...q = 1 + i (x * 0) + j (y * 0) + k (z * 0)
  • 7.
    QUATERNION TO AXISANGLEAt angle 0 degrees?q = 1working back from above equation qw = 1Angle = 2 * sqrt (1 – qw*qw)Angle = 2 * sqrt (1 – 1 * 1)Angle = 0 degrees
  • 8.
    QUATERNION TO AXISANGLETry solving….A.) 180 degreesB.) 0.7071 + i0.7071
  • 9.
    AXIS ANGLE TOQUATERNIONEquations:qx = ax * sin(angle/2)qy = ay * sin(angle/2)qz = az * sin(angle/2)qw = cos(angle/2)WHERE DID THESE EQUATIONS CAME FROM?!
  • 10.
    AXIS ANGLE TOQUATERNIONDerivation of the equationFrom trigonometry formulacos(angle/2)2 + sin(angle/2)2 = 1
  • 11.
    AXIS ANGLE TOQUATERNIONmultiplying the sine part by 1 = ax*ax + ay*ay + az*az will have no effect so we can write:cos(angle/2)2 + (ax*ax+ ay*ay + az*az) * sin(angle/2)2 = 1
  • 12.
    AXIS ANGLE TOQUATERNIONExpanding the equation…cos(angle/2)2 + ax*ax * sin(angle/2)2 + ay*ay * sin(angle/2)2+ az*az * sin(angle/2)2 = 1
  • 13.
    AXIS ANGLE TOQUATERNIONThis shows that the quaternion is normalized since it is in the form:qw2 + qx2 + qy2 +qz2 =1 is like…cos(angle/2)2 + ax*ax * sin(angle/2)2 + ay*ay * sin(angle/2)2+ az*az * sin(angle/2)2 = 1
  • 14.
    AXIS ANGLE TOQUATERNIONqw2 + qx2 + qy2 +qz2 =1qw2 = cos(angle/2)2qx2= ax*ax * sin(angle/2)2qy2 = ay*ay * sin(angle/2)2qz2 = az*az * sin(angle/2)2
  • 15.
    AXIS ANGLE TOQUATERNIONWhen we square the equations, the equations turned into…qw = cos(angle/2)qx= ax * sin(angle/2)qy = ay * sin(angle/2)qz= az * sin(angle/2)
  • 16.
    AXIS ANGLE TOQUATERNIONLets try solving it…A.) Angle = 90 degrees, axis = 1, 0 , 0
  • 17.
    AXIS ANGLE TOQUATERNIONLets try solving it…A.) Angle = 90 degrees, axis = 1, 0 , 0Use these equations:qw = cos(angle/2)qx= ax * sin(angle/2)qy = ay * sin(angle/2)qz= az * sin(angle/2)
  • 18.
    AXIS ANGLE TOQUATERNIONSolving these…qw = cos(90/2),qx= 1 * sin(90/2)qy = 0 * sin(90/2)qz= 0 * sin(90/2)
  • 19.
    AXIS ANGLE TOQUATERNIONqw = 0.7071qx= 0.7071qy = 0qz= 0This gives a quaternion (0.7071 + i0.7071)
  • 20.
    QUATERNION TO AXISANGLE AXIS ANGLE TO QUATERNIONGroup 4:Jameson Chu ™Robin Marcelo ™Arric Tan™
  • 21.
    QUATERNION TO AXISANGLE AXIS ANGLE TO QUATERNIONSources: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htmhttp://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htmhttp://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm