POV-Ray : Newsgroups : povray.general : Basic usage instructions for Matrix Calc : Re: Basic usage instructions for Matrix Calc Server Time
9 Aug 2024 03:22:50 EDT (-0400)
  Re: Basic usage instructions for Matrix Calc  
From: Warp
Date: 21 Aug 2000 05:36:50
Message: <39a0f832@news.povray.org>
David Fontaine <dav### [at] faricynet> wrote:
: Shearing is the best use of matrices I think.

  How do you make shearing in your program that is easier to use than using
a matrix transformation in povray?

: To do it with normal tranforms
: takes some trig.

  Yes, but you can use a matrix as well.

: But it also writes more compact code if for some reason you
: want something like
: object { ... translate ... scale ... rotate ... translate ... }

  What's the advantage of the compact code?
  A matrix transformation is a lot harder to read and understand than a series
of other transformations.
  And besides, you'll probably want to modify some of those transformations.
In matrix form that's pretty complicated.

: (maybe you want to an object to be scaled and rotated about a point other than
: the origin and then move it into place...)

  I don't see the problem here.

translate -LocalOrigin
transformations
translate LocalOrigin

  And that's a lot easier to read and understand than a matrix transformation.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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