POV-Ray : Newsgroups : povray.general : Floating point precision : Floating point precision on Matrix? Server Time
2 Aug 2024 02:22:29 EDT (-0400)
  Floating point precision on Matrix?  
From: Tim Nikias
Date: 4 Feb 2005 06:10:40
Message: <42035830@news.povray.org>
So, I've done some tests and worked on the code to get rid of places where
precision was an issue, but superflous calculations could be applied later.
I've been using lots of vdot to project things onto planes, but have found
that the plane essentially always is the y-plane, so I could just multiply
the vector with <1,0,1> instead...

Anyways, I've come to a point where the error pops up much less than before.
*BUT* I've found something else, which I find a little disturbing, but
that's probably precision again...

I create a transform with only a matrix inside to rotate an object. I do
this in order to get hold of an arbitrary axis to rotate the object, then I
use the inverse matrix to re-align the object and use the usual axis' for
rotation. I've found that applying the inverse matrix and then the matrix
returned a different results that just leaving it out altogether on a few
occasions in hundreds of objects. It's a miniscule amount, but it suffices
to displace some objects very visibly.

My question: the inverse transform is probably applied to the entire
transform. Would it be feasible to implement my own macro to inverse a
matrix, or would that be wasted time?

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.