mauricio_di_mauro

08-29-2009, 08:39 AM

Hey Guys,

I am trying to understand quaternions.

I am using a book called: "Mathematics for Computer Graphics" and the NEHE-Tutorial.

Nehe_Quaternion (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Quaternion_Camera_Class)

But after looking closely i have seen that they have 2 different Quaternion definitions.

The + changes to -, when the position of two coefficients is changed.

It would make sense, if this were two imaginary digits but s is real.

Can i assume that it is the same?

But i dont understand why the unsign is changing, when i multiplicate an imaginary with a real digit.

I thought that the multiplication of two imaginary digits is not commutative.

Is it the same with imaginary digits and real ones?

Thanks

BOOK | NEHE | Difference |

------------------------------------------------------------

M11 = 1 - 2(yy + zz) | 1 - 2(yy + zz) |

M12 = 2(xy - sz) | 2(xy + zs) | X

M13 = 2(xz + sy) | 2(xz - ys) | X

M14 = 0 | 0 |

------------------------------------------------------------

M21 = 2(xy + sz) | 2(xy - zs) | X

M22 = 1 - 2(xx + zz) | 1 - 2(xx + zz) |

M23 = 2(yz - sx) | 2(zy + xs ) | X

M24 = 0 | 0 |

------------------------------------------------------------

M31 = 2(xz - sy) | 2(xz + ys) | X

M32 = 2(yz + sx) | 2(yz - xs) | X

M33 = 1 - 2(xx + yy) | 1 - 2( xx + yy ) |

M34 = 0 | 0 |

------------------------------------------------------------

M41 = 0 | |

M42 = 0 | |

M43 = 0 | |

M44 = 1 | |

------------------------------------------------------------

I am trying to understand quaternions.

I am using a book called: "Mathematics for Computer Graphics" and the NEHE-Tutorial.

Nehe_Quaternion (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Quaternion_Camera_Class)

But after looking closely i have seen that they have 2 different Quaternion definitions.

The + changes to -, when the position of two coefficients is changed.

It would make sense, if this were two imaginary digits but s is real.

Can i assume that it is the same?

But i dont understand why the unsign is changing, when i multiplicate an imaginary with a real digit.

I thought that the multiplication of two imaginary digits is not commutative.

Is it the same with imaginary digits and real ones?

Thanks

BOOK | NEHE | Difference |

------------------------------------------------------------

M11 = 1 - 2(yy + zz) | 1 - 2(yy + zz) |

M12 = 2(xy - sz) | 2(xy + zs) | X

M13 = 2(xz + sy) | 2(xz - ys) | X

M14 = 0 | 0 |

------------------------------------------------------------

M21 = 2(xy + sz) | 2(xy - zs) | X

M22 = 1 - 2(xx + zz) | 1 - 2(xx + zz) |

M23 = 2(yz - sx) | 2(zy + xs ) | X

M24 = 0 | 0 |

------------------------------------------------------------

M31 = 2(xz - sy) | 2(xz + ys) | X

M32 = 2(yz + sx) | 2(yz - xs) | X

M33 = 1 - 2(xx + yy) | 1 - 2( xx + yy ) |

M34 = 0 | 0 |

------------------------------------------------------------

M41 = 0 | |

M42 = 0 | |

M43 = 0 | |

M44 = 1 | |

------------------------------------------------------------