grt-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [grt-talk] Transformations


From: Jason Dagit
Subject: Re: [grt-talk] Transformations
Date: Tue, 1 Apr 2003 15:06:59 -0800

Nikodemus Siivola wrote (on Wed, 2 Apr 2003 at 01:47 +0300):

 > > Are you familiar with memoizing a function?  We could use that to
 > > cache inverse matrices.
 > 
 > Yes, I am familiar with it, but we can do even better: since there
 > is one matrix per object, we can simply stuff the inverses into
 > objects as well. Make the accessor OBJECT-MATRIX such that it
 > always updates the inverse when the original is changed.

Ah, good idea.

 > > How did you implement the matrix inversion.  I know for 3x3 and
 > > less there is a formula to invert them.  I'll check on the 4x4
 > > case.
 > 
 > It's not possible in a general case I believe, but can be done if
 > the matrix fulfills a certain set of conditions (orthogonal, +
 > others) -- which an affine transformation matrix happily fulfills.

Are you sure they are orthogonal?  The reflection/rotation component
of them should be orthogonal (at least, that sounds right), but I
don't think the translation is.  But I guess if you just transpose the
orthogonal part and then subtract the translation then you have the
inverse?  I should shut up until I look at the code....

 > Being lazy I got the code from CMUCL AI repository.
 > 
 >  
 > http://www-2.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/lang/lisp/0.html

I'll try to check it out.

Jason




reply via email to

[Prev in Thread] Current Thread [Next in Thread]