POV-Ray : Newsgroups : povray.advanced-users : Calculating visible camera area : Re: Calculating visible camera area Server Time
27 Apr 2024 16:29:42 EDT (-0400)
  Re: Calculating visible camera area  
From: Le Forgeron
Date: 25 Oct 2016 14:23:16
Message: <580fa314$1@news.povray.org>
Le 25/10/2016 à 18:40, Bald Eagle a écrit :
> 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.

I'm afraid not, so far at least.

The best I have to propose is just getting the basic data back from the
camera:

http://wiki.povray.org/content/User:Le_Forgeron#Access_to_camera_information

On the good side, it might be possible to call
TracePixelCameraData::CreateCameraRay(Ray& ray, DBL x, DBL y, DBL width,
DBL height, size_t ray_number, TracePixel& parent)
to build the ray and extract its data.

Or you can just use the C++ code of it so far with the previous pieces
of data to make your own computation without patch.


Post a reply to this message

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