POV-Ray : Newsgroups : povray.binaries.images : Viewing geometry problem : Re: Viewing geometry problem Server Time
5 Nov 2024 11:19:18 EST (-0500)
  Re: Viewing geometry problem  
From: Tim Attwood
Date: 4 May 2009 17:31:18
Message: <49ff5ea6$1@news.povray.org>
> To implement a LOD (level of detail) system for large surface textures 
> of planets in my Solar System model, I started with testing the FOV 
> width in POV units corresponding to camera distance and angle.
> 
> As the horizontal image width (in POV units) as 
> camera_distance*tan(angle/2), a sphere with a radius of 3396.2 units 
> (the planet Mars) should exactly fit into the camera window when viewed 
> from a distance of 9330.982812 units - but instead the planet's disc is 
> still too large for the image (see attachment)! Obviously, "angle 40" 
> does not give really a 40-degree FOV, but a somewhat narrower one... or 
> what else did I get wrong?

I think you used degrees instead of radians.

#include "colors.inc"
#include "math.inc"

#declare disc_radius = 3396.2;
#declare camera_angle = 40;
#declare camera_dist = -(disc_radius/tand(camera_angle/2));

camera {
   location  <0, 0, camera_dist>
   direction 1.0*z
   right     x*image_width/image_height
   look_at   <0.0, 0.0,  0.0>
   angle camera_angle
   
}

background {Black}

disc {<0,0,0>,-z,disc_radius
   texture {
      pigment {White}
      finish {ambient 1}
   }
}


Post a reply to this message

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