Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: "Michael Hough" Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Quaternion 2 Matrix ... Date: Sun, 23 May 1999 13:37:32 -0700 Organization: SCEA News Server Lines: 41 Message-ID: <7i9p8e$hd3@scea> References: <7i9jkp$lic17@chuka.playstation.co.uk> NNTP-Posting-Host: rippy.Stanford.EDU X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Markus Tesche wrote in message news:7i9jkp$lic17@chuka.playstation.co.uk... > M->m[0][0] = (ONEsqr - (yy + zz)) / ONE; > M->m[0][1] = (xy + wz) / ONE; > M->m[0][2] = (xz - wy) / ONE; > > M->m[1][0] = (xy - wz) / ONE; > M->m[1][1] = (ONEsqr - (xx + zz)) / ONE; > M->m[1][2] = (yz + wx) / ONE; > > M->m[2][0] = (xz + wy) / ONE; > M->m[2][1] = (yz - wx) / ONE; > M->m[2][2] = (ONEsqr - (xx + yy)) / ONE; > > M->t[0] = 0; > M->t[1] = 0; > M->t[2] = 0; > } > > OK, thanks, Bye MT I was having a similar problem. I ran through the math a while ago, and it looks like you need to flip the signs on your (xy + wz) etc. terms: m->m[0][0] = 4096 - (yy + zz); m->m[0][1] = xy - wz; m->m[0][2] = xz + wy; m->m[1][0] = xy + wz; m->m[1][1] = 4096 - (xx + zz); m->m[1][2] = yz - wx; m->m[2][0] = xz - wy; m->m[2][1] = yz + wx; m->m[2][2] = 4096 - (xx + yy); This seems to be working for me. mike