POV-Ray : Newsgroups : povray.advanced-users : Projecting an image outward from the camera : Re: Projecting an image outward from the camera Server Time
8 Jul 2024 19:19:33 EDT (-0400)
  Re: Projecting an image outward from the camera  
From: Tim Attwood
Date: 6 Jul 2007 02:41:02
Message: <468de3fe$1@news.povray.org>
> Idea 2. Inverted-spherical camera with look_at in center of object
I had some moderate success generating a dirt map with this camera
in MegaPov, but it generates poor results if parts of the object are
obscured to the sphere, I guess that's similar to problem with idea 3.

// inverse-spherical camera
#declare cx = function(u,v,r) {r*cos(u*pi*2)*sin(v*pi)};
#declare cy = function(v,r) {-r*cos(v*pi)};
#declare cz = function(u,v,r) {r*sin(u*pi*2)*sin(v*pi)};
camera {
   user_defined
   location {
      function {cx(u,v,50)}
      function {cy(v,50)}
      function {cz(u,v,50)}
   }
   direction {
      function {cx(u,v,-1)}
      function {cy(v,-1)}
      function {cz(u,v,-1)}
   }
}


Post a reply to this message

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