POV-Ray : Newsgroups : povray.general : object oriented features : Re: object oriented features Server Time
28 Jul 2024 16:30:39 EDT (-0400)
  Re: object oriented features  
From: John VanSickle
Date: 22 Aug 2000 09:10:43
Message: <39A27BD2.C662EFED@erols.com>
Ron Parker wrote:
> 
> On 21 Aug 2000 05:28:18 -0400, Warp wrote:
> >In povray.general Ron Parker <ron### [at] povrayorg> wrote:
> >: You might be surprised.  Except for the arbitrary transforms (which make
> >: the problem different, but possibly not much more difficult) it's relatively
> >: easy to decompose a matrix into rotations, scales, and translates.  I wrote
> >: the whole mess up for someone in c.g.r.r. a few years ago; I think I might
> >: still have it in my outbox.
> >
> >  How do you decompose a matrix transformation which causes shearing to
> >rotations, scales and translates?
> >  For example think about this:
> >
> >scale <1,.5,.8>
> >rotate <30,45,20>
> >scale <.8,.25,.5>
> >translate <2,3,4>
> >rotate <15,20,80>
> 
> It's been a while.  I think there were additional constraints on the solution.

Most algorithms to decompose matrices begin by assuming that the component
transforms were done in a particular order.  This generally works because the
predominant habit among modellers is to scale first, rotate second, and translate
third.  The resulting matrix can always be broken down into the original three
transforms (with a caveat in regards to rotation).

Note that the translate could have been the second or even the first
transform actually applied; however, simple examination of the resulting
matrix cannot reveal whether this is so.

Likewise, if shearing is present, there is no way to tell when or how it was
done.  Consequently the decomposing algorithm must make assumptions, which
may be wrong.

The only time one can make a useful guess at the order of operations is when
the matrix under consideration is a slight modification of a matrix whose
original transforms are already known.  Evn then it can be tricky.

Regards,
John


Post a reply to this message

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