POV-Ray : Newsgroups : povray.pov4.discussion.general : superlinear transformations : Re: superlinear transformations Server Time
30 Apr 2024 04:04:15 EDT (-0400)
  Re: superlinear transformations  
From: Warp
Date: 26 Sep 2008 14:58:58
Message: <48dd30f2@news.povray.org>
Dan Connelly <djc### [at] yahoocom> wrote:
> Presently, objects can be transformed according to a displacement
> vector plus a 3x3 matrix.  This is a linear transformation.  However,
> it would be useful if one could also do nonlinear transformations.
> For example, x -> x * y, or x -> x * (1 + 0.1 * sin(y)).  I can easily
> see how this would become hopelessly complex, but it would be useful.

  Actually objects are not transformed at all. That would be impossible
in the generic case.

  What POV-Ray does is a common raytracing trick: Rather than transform
the object with the transformation matrix, it transforms the ray with
the inverse of the transformation matrix. The end result is exactly the
same, but the advantage is that it's much easier (and in many cases,
*possible*) to do it like this.

  This is the reason why transformations must be linear. The straight ray
must be straight also after it's transformed. It cannot become curved.
This is the reason why only rotation, scaling, skewing (which is actually
a combination of rotation and uneven scaling) and translation is possible.

  Raytracing with curved lines cannot be done accurately, and would be
extremely slow.

-- 
                                                          - Warp


Post a reply to this message

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