POV-Ray : Newsgroups : povray.binaries.images : Viewing geometry problem : Re: Viewing geometry problem Server Time
31 Jul 2024 20:21:46 EDT (-0400)
  Re: Viewing geometry problem  
From: John VanSickle
Date: 8 May 2009 08:27:37
Message: <4a042539$1@news.povray.org>

> High!
> 
> 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?

To see what's going on,

1) Draw a circle.
2) Draw a line dividing the circle into equal halves.
3) Select a point on either side, outside of the circle.
4) Draw two lines, one going from the point you chose in step three to 
each of the ends of the circle's diameter.

You will observe that one or both of the lines from step 4 intersect the 
circle before reaching the end of the diameter.

The following code produces a scene in which the sphere exactly touches 
the left and right edges of the frame.

// BEGINNING OF SCENE
#local camAngle=40;
#local sphereRad=45;


sphere { 0,sphereRad pigment { rgb .75 } }

camera {
   angle camAngle
   location -z*sphereRad / sin(radians(camAngle/2))
   look_at 0
}


light_source {
   <1e4,1e4,-1e4>
   1
}

// END OF SCENE

You can change the values of camAngle and sphereRad, and the scene will 
not change significantly.

Regards,
John


Post a reply to this message

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