POV-Ray : Newsgroups : povray.binaries.images : Fitting a box into the view (was Re: A simple geometry problem for you...) : Fitting a box into the view (was Re: A simple geometry problem for you...) Server Time
7 Aug 2024 23:22:02 EDT (-0400)
  Fitting a box into the view (was Re: A simple geometry problem for you...)  
From: Vincent LE CHEVALIER
Date: 14 Nov 2005 15:51:17
Message: <4378f8c5@news.povray.org>
JRG wrote on povray.off-topic:
> Suppose you have a bounding box, aligned with the axes. Then you have a 
> camera, placed in a known location, pointing towards a known 
> direction... and the up vector can be any direction. You also know the 
> horizontal and vertical FOVs. Now suppose you want to transform the 
> camera in order to make the bounding box fit the view as close as 
> possible. You want to preserve its original direction and FOV, thus 
> moving its location and its interest only.

Here are two images showing the results of the script posted on 
povray.text.scene-files, solving this problem.

The first one shows the result, that is, a box fitted into view.
The second one illustrates the method, showing the constraints, etc... 
explained in greater detail in the script.

I'm posting this in case anyone needs it in the future...

-- 
Vincent


Post a reply to this message


Attachments:
Download 'bestfit.png' (3 KB) Download 'figure.png' (33 KB)

Preview of image 'bestfit.png'
bestfit.png

Preview of image 'figure.png'
figure.png


 

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