POV-Ray : Newsgroups : povray.advanced-users : Calculating visible camera area : Re: Calculating visible camera area Server Time
28 Apr 2024 03:45:34 EDT (-0400)
  Re: Calculating visible camera area  
From: Alain
Date: 25 Oct 2016 16:53:59
Message: <580fc667@news.povray.org>

> I thought there had been some discussion about this, Way Back When (TM), but I
> could not locate a thread.
>
> I was wondering if there were some way to calculate the positions of the four
> corners of the visible render frame, or unit-length-vectors that point from the
> camera in those directions.
>
> If there are other formulas for calculating schtuff associated with the final
> render and field of view, that would be helpful as well.
>
> Currently just interested in typical perspective camera, though I also use
> orthographic frequently.
>
> Thanks
>
>
If you use an orthographic camera WITHOUT the angle keyword, located on 
the Z axis and looking toward +z, the dimentions are :
Top left : up, -right
Top right : up, right
Bottom left : -up, -right
Bottom right : -up, right

For any other projections, it's not obvious. You'll need to use some 
trigonometry. This can give you the direction vectors that are parallel 
to the edges of the rendered image. As a starting point, take a look at 
the file screen.inc that is made to deal with such situations.


Alain


Post a reply to this message

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