I'm currently working on a project that generates povray scenes
programmatically. These scenes can vary in overall dimensions, and I am
having diffculty calculating a camera position that incorporates every
element of the scene, without introducing lots of space around the edges.
Is there a way to calculate the position of the camera, knowing what
direction it should point in. My 3d trig. just isn't up to the challenge.
Values that are known are:
- A list of scene extremities as 3d coordinates (e.g. a simple block would
have 8 extremities)
- The camera angle (set at 20 degrees)
- The direction the camera should point in
- The aspect ratio
I would appreciate any comments/suggestions(or solutions :) )
Post a reply to this message
|