How do I get the camera rotation angles from the "eye"?

I have a 3D scatterplot and would like to have an accompanying 2D plot of the same data, which can be brushed over. The 2D plot should be the projection of the data from the current viewpoint - the two plots should look almost identical. So basically, I need the 3D rotation matrix that takes the data to the current camera position. The camera eye, which I got by computing


gives some 3D vector, but it’s not at all clear how to get the rotation angles.

Unfortunately, our internal scene object does not have a to-rotation-matrix method exposed.

It wouldn’t be too hard to write one up from the scene camera up, center and eye vectors.

Thanks for the reply. I’d be willing to do that myself, but I don’t know what those vectors mean, geometrically. The rotation should be somewhere in eye but I can’t figure it out.

This tutorial would be a good place to start.

Let me know if you have any questions.

Etienne, is there a reliable way how to code a series of up, center, eye values that would result in a 360 rotation around the vertical central axis of a plot?