I'm trying to simulate reflections in a flat surface based on PRMan Application

Note #6. The app note is online at

http://www.pixar.com/products/renderman/toolkit/Toolkit/AppNotes/appnot

e.6.html

As the app note says in the "Reflecting the Camera" section, it's easy to set

up if the reflection bearing surface is aligned on the x, y or z plane. Then

it says:

If the reflection plane is not aligned with the coordinate system

axes, it's a little harder to reflect the camera through the

reflection plane. Instead of using just an RiTranslate call to move

the z=0 (or x=0 or y=0) plane to coincide with the reflection plane,

it is necessary to use both an RiRotate and an RiTranslate. The axis

of rotation is the cross product of the normal vectors of the

reflection plane and the z=0 plane. The direction of translation is

along the normal vector of the reflection plane. The inverse

RiTranslate and RiRotate must be used to transform the reflection

plane back to z=0 after the RiScale is applied. If you prefer, all of the

rotations, translations, and scales can be combined into a single

transformation matrix that can be applied using the RiConcatTransform

call.

I've gotten all of that working, except for one thing. The note told how to

compute the axis of rotation for RiRotate, but not the angle. Can someone

suggest a good way to do that?

Doug