POV-Ray : Newsgroups : povray.general : look at bounding box Server Time
2 Aug 2024 16:21:54 EDT (-0400)
  look at bounding box (Message 1 to 1 of 1)  
From: Rafal 'Raf256' Maj
Subject: look at bounding box
Date: 14 Aug 2004 03:39:38
Message: <Xns954562A022408raf256com@203.29.75.35>
Hi,
if I have an object with bounding box  like for example 

#declare W1 = <-1,-2,-3>;  #declare W2 = <5,6,5>;
object { my_object bounded_by { box { W1, W2 } } }

and I have camera 
#lok = <-50,-50,-60>;
camera { location lok ...

how to define camera's look_at and angle so that entire object will nicely 
fit into view port?

Assuming that aspect ratio is not standard and is defined by image_width / 
height?

Look_at would be probably geometric center (W1+W2)/2 and the angle?

Assuming that angle is quite low normal, like 20..50, not like 90-150 so 
there is no heavy perspective distortion to took into account (assume this 
is a izometric view almost)...

The camera location would be about <100,100,-100> in one situation, and 
<0,0,-100> in other (in relation to object's center)

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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