Rectangular coordinates->rotation angles

Hi,

I have a plane defined by a point in space and a normal which determines it’s orientation. How can I convert from the rectangular coordinates of the plane’s normal (eg. 0,1,0) to a set of rotations which will orient the plane in the same way?

I’m porting some raytracing code into OpenGL and want to represents the simple plane objects as OpenGL quads for a preview prior to tracing.

Anyone?

We could get into a whole discussion of the use of atan etc, but why bother when you can just use glMultMatrix?

Presumably you have the three axes and an offset already?

The raytracer maintains planes a mathematical description while the OpenGL side uses a quad, translated, scaled and rotated to produce the equivalent object on screen for preview purposes.

I need to convert the math description of the orientation (the direction of the plane normal) into values for glRotate().

Should be simple, but I’m a bit stuck.

This version of the tracer does NOT use affine transformations for a good reason.