In python, is there a method or function for adjusting the camera's parameters so that it covers a specific area, rather than just pointing at a specific point?
This would be handled by zooming in or out, but to what degree?
The following is one way to handle it, but not the only way - if there are other ideas I would appreciate the opportunity to learn about them.
Let's assume that I want the camera to point at (X,Y,Z).
I also want the camera's perspective to meet the following requirements: (a) left edge includes point (X-2,Y,Z) (b) right edge includes point (X+2,Y,Z) (c) top edge includes point (X,Y+2,Z) (d) bottom edge includes point (X,Y-2,Z)
As an illustration, I would pass the desired points to the function, which would position the camera in such a way that the points fall on the edges of the camera view as follows:
The above would not only aim the camera correctly, but would insure that all of the important elements of the scene are included.
Thanks in advance!