|
|
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
|
|