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