A bit of a math question here, hopefully someone finds this interesting, or better yet, a possible solution. :)
I've drawn this up on a diagram, but I'll explain it here for further illustration.
I've got a camera that orbits around a point. It has a set radius away from it's orbit point, and an object it 'looks at'.
Here's where things start to get interesting. The object it's looking at can have a target, somewhere else in the world. I'd like to constrain the camera to orbit such that it keeps a set number of degrees between the target and the object it's looking at.
Is there any mathematical way of getting the precise location(s) of the new camera resting point? Ideally one that isn't too computationally expensive, and ideally one I can understand? :)
Here's a diagram where I've tried to illustrate the issues, as well as the knowns and unknowns.

After doing some research, I'm thinking I can solve this using a combination of cosine law and tan law, substituting when necessary, but I'm not entirely confident and it'll take a while to build the equations and plug it in. In the meantime, I'd love to have other people's opinions or ideas.
Cheers,
-e-













