POV-Ray : Newsgroups : povray.general : Projective transform matrix : Re: Projective transform matrix Server Time
31 Jul 2024 12:26:59 EDT (-0400)
  Re: Projective transform matrix  
From: Warp
Date: 19 Feb 2007 17:27:31
Message: <45da2453@news.povray.org>
Grassblade <nomail@nomail> wrote:
> Hmm, but wouldn't it be straightforward to keep the transformation matrix
> linear and have the ray vector be an easy to invert non-linear
> transformation? E.g.
> (a11 a12 a13)(x^2)
> (a21 a22 a23)(y^3)
> (a31 a32 a33)(z)

  Whichever transformation you apply to the ray, it must be kept a
straight line. There's no way around it.

  Of course you may be thinking: "Ok, even though each ray is kept
straight, what stops me from applying *different* transformations
to each ray instead of applying the exact same to all of them?"

  Good question. You can perform all kinds of transformations to individual
rays, of course. In fact, if you want to play with that, you can already
do that in a whole-scene level: You can add a "normal" block to the camera
which will transform the rays in a non-linear fashion (ie. each ray can
be transformed completely differently from the other rays).

  The problem with this is that it's not very useful. It's only useful
for special effects, but not to transform objects. You are basically
distorting the projected image of the object, not the object.

  For example, suppose you have a camera at -z*10 and looking at the origin,
and a cylinder { -y, y, 1 }.
  You can transform the camera rays in such a way that the cylinder will
appear to actually be a cone.
  Great? Non-linear transformations, here we come?

  Unfortunately not. Now apply a "rotate x*45" to the cylinder: Oops!
It's not the same kind of cone anymore. It's distorted, but quite
differently from before, and it doesn't look like a regular cone any
longer.
  In fact (AFAIK) there's no possible set of transformations which could
be done to the rays in order to make the cylinder still look like a
regular cone in this case.

  In other words, by perturbing the rays in certain ways you can distort
objects, but these distortions are not stable. They depend on the
orientation of the object. Rotate the object, and it distorts differently.
It's not possible to transform the rays in such way that a certain
distortion will keep stable regardless of the orientation of the object.
  As said, it can be used for some special effects, but unfortunately it
doesn't work as a transformation.

-- 
                                                          - Warp


Post a reply to this message

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