grt-talk
[Top][All Lists]
Advanced

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

Re: [grt-talk] Transformations


From: Nikodemus Siivola
Subject: Re: [grt-talk] Transformations
Date: Wed, 2 Apr 2003 01:47:05 +0300 (EEST)

> 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.

> 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.

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

  -- Nikodemus





reply via email to

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