From: Patrick H. <pa...@13...> - 2003-09-07 22:21:41
|
I think that there is a bug in the code that does optimizations for matrix operations based on the matrix state. Unfortunately, I don't know the GMTL code (or math in general) well enough to track down the bug. I can describe the symptoms, however, with the hope that someone can give me a suggestion on how to do further debugging. Basically, what happens is the values of an affine matrix approach zero after it is inverted. Eventually, they reach zero, and my application crashes. (The application was not written by me, and the math in it is way beyond me.) What is particularly vexing is that the single inversion appears to be the only place in the code where the matrix is modified, but somehow its values change constantly after that point. I must be missing something--I just haven't figured out what. In any event, if I back out the only changes to Generate.h, Matrix.h, and MatrixOps.h to remove the state tracking optimizations, the code starts working again without any problems. I'm guessing that the problem is in gmtl::invertAffine() since it was added as part of the optimization code. Perhaps there is something in that function that causes additive round-off errors? The specific revisions in question are the following: Generate.h: 1.73 Matrix.h: 1.28 MatrixOps.h: 1.31 I would appreciate any suggestions on how to track down this problem or any suggested fixes (short of backing out the optimizations altogether). -Patrick -- Patrick L. Hartling | Research Assistant, VRAC pa...@13... | 2274 Howe Hall Room 2624 PGP: http://www.137.org/patrick/pgp.txt | T: +1.515.294.4916 http://www.137.org/patrick/ | http://www.vrac.iastate.edu/ |