POV-Ray : Newsgroups : povray.general : spacewarps non-linear tracing : Re: spacewarps non-linear tracing Server Time
2 Aug 2024 04:23:57 EDT (-0400)
  Re: spacewarps non-linear tracing  
From: Warp
Date: 8 Jan 2005 07:17:57
Message: <41dfcf75@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> I suppose it's either tracing piecewise linear rays or always using a 
> numerical root solver (like POV-Ray does for isosurfaces).  In any case 
> it would be quite slow.

  I think all those example images could be rendered by simply
applying proper (linear) transformations to the rays (this is not
possible with the official povray because you can't apply a completely
free transformation to each camera ray, but it shouldn't be too
difficult to write such patch).
  The problem with this approach is that it simply distorts the entire
image (in the same way as normal{} in the camera block does) and does
not really result in a transformation of an object (it would not be,
however, the same thing as a 2D transformation of the image because eg
the shading of the objects would change according to the direction of
the rays, and thus you would get a much more convincing "distortion" of
the scene than just a 2D distortion of the final image).
  Even if you transformed the rays freely on a per-object basis (it would
also be quite easy to write such patch) you could get an object which
looks non-linearly transformed but only when directly viewed from the
camera (its problem would be that its shadow and its reflection/refraction
on other objects would not work correctly).

  In order to understand what I mean by my last paragraph above, think
what happens when you transform a ray to the local space of an object:
The ray is multiplied with the inverse of the transformation matrix
of the object in question. Nothing would stop us from performing other
type of transformations to this ray at the same time: For example, the
ray could be translated in the y axis by an amount equivalent to x^2
(taking the x coordinate of the ray at a certain z position, for example).
  This would make the object to seemingly "bend" in a parabolic way
downwards.
  The effect can, in fact, be quite convincing when directly viewed
from the camera. However, I believe that for example the shadows of
the object would not be correct (they would not correspond to an object
bent that way from the camera point of view). Also if there was a
mirror where we could see the object from another direction, I think
it would also show an object which looks completely different.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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