The normal of your plane is 0,1,0; therefore your plane can be parameterized by the x axis and z axis (1,0,0) and (0,0,1). When you construct a 3x3 matrix, it maps (1,0,0) to the first column, (0,1,0) to the second column, and (0,0,1) to the third column; therefore, figure out two axes for your desired destination plane and stick them in the first and third columns of the matrix. Then let the second column be the cross product of the third and first (in that order). You probably want the two axes you choose to be orthogonal (perpendicular) and of unit length.

Hi

I have a plane given from a normal and the distance to the origin.

A ground plane would look like this:

normal = (0,1,0)

distance = 0

How would I find a transformation matrix witch would transform the plane or points from the ground plane on to a plane with arbitrary values?

I am not sure that was clear.

If I would actually want to render a ground plane I could use an identity matrix but for other planes I would need a transformation matrix so I can transform the ground plane into the plane represented trough an arbitrary normal and an arbitrary distance.

Side info: Nope this is not homework. I try to find a way so I can sync the results from the physics lib with the gfx output. I can construct point on the searched plane and build a vertex buffer. Then I just render the vertex buffer using an identity matrix. But I would like to know how to use it with meshes. Then I would have a mesh representing a ground plane and use a matrix to put it in place.

Thx for any input.