How To Rotate/Position a Camera at a Point

I need to translate my camera around the X axis of a part, while also looking down and rotating around it.

I need to be explained to the equations I use and why I should use them.

Can anyone help me?

Here is a code base that I understand…



Vec3 camera = new Vec3(0, 0, 0);
Vec3 object = new Vec3(0, 0, 0);

//TODO: Set camera away from the camera and pans around it when pressing left or right key
//TODO: Set camera rotation to look at the object at all times
//TODO: Add zooming functionality