POV-Ray : Newsgroups : povray.pov4.discussion.general : New camera, or new camera docs illustrations. : Re: New camera, or new camera docs illustrations. Server Time
21 Apr 2024 07:50:24 EDT (-0400)
  Re: New camera, or new camera docs illustrations.  
From: Zeger Knaepen
Date: 11 Aug 2009 04:29:22
Message: <4a812be2$1@news.povray.org>
"clipka" <ano### [at] anonymousorg> wrote in message 
news:4a80d86e$1@news.povray.org...
> SharkD schrieb:
>> gregjohn wrote:
>>> It took me 13 years of povving to understand the camera. That is, to 
>>> come up
>>> with the code for a box which exactly fills the screen, regardless of 
>>> camera
>>> angle/ distance and image aspect ratio.
>>
>> I don't see what the difficulty is. It's as simple as this:
>>
>> ...
>>
>> The trick here is to not use the angle and look_at keywords. In this 
>> case, they're more trouble than they're worth. Also, if you omit the 
>> image_width/image_height stuff, then it fills the viewport *exactly*, 
>> regardless of the aspect ratio.
>
> What you're doing is designing camera parameters so that a certain 
> "friendly" box fills the entire screen.
>
> The OP's challenge, however, was quite different: From a given arbitrary 
> (potentially "unfriendly") camera perspective, compute parameters for a 
> box to fill the screen (possibly to overlay a border, signature or 
> whatever onto the image).

isn't that exactly why screen.inc was made?

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

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