Shadow changing planes

What i had been doing, was taking the rz rotation matix for 45^ and the the Rx rotation matrix for 45^ (these are the two axes the scanner is rotated around) and multiplying them Rx45 x Rz45 x Ry0 which was giving me the matrices ive mentioned.

If its the first column of this matrix, which is x,y and z? Is it read in that order?

Am i doing it correctly?

Sorry guys, still kind of stuck with this simple part.

Imagine this matrix


          0.8660  \\   -0.5   \\   0
          0.5     \\    0.866 \\   0
          0       \\    0     \\   1

What is n_x, what is n_y and whats is n_z?

(Sorry, no matter how many spaces/dashes i put in i cant seperate the numbers any more)

(use [ code ] blocks without the spaces to preserve formatting)

A transformation matrix is different from a vector, you try to mix things.
When you multiply the 3D vector n (with [nx,ny,nz]) by a 3x3 rotation matrix, you get a new 3D vector, m, with [mx,my,mz].

There is no magic in this, either you use already working code for vector*matrix multiplication, or read this for an example of a 2x2 rotation matrix that multiplies coordinates, and shows the result :
http://en.wikipedia.org/wiki/Rotation_matrix#Rotations_in_two_dimensions

Thanks for the reply, ZBuffer. i know this isn’t magic, im not confused, just missing a piece of the puzzle.

To clarify, what i had been doing was, as it is a 3D rotation, substituting 45^ (or whatever angles I choose for a test) into two rotation matrices, depending on what two axis i am rotating around.

I then multiply Rx x Ry x Rz, as it mentions further down for matrix multiplication.

For the 45^ multiplication, I got

0.7071   -0.7071         0
    0.5000    0.5000   -0.7071
    0.5000    0.5000    0.7071

The normals you identifed for 45^ earlier were 0.5, and 0.7071. I assumed (wrongly) that was where you got it from, reading positions from those matrices.

So what i actually should be doing is multiplying some 3x3 matrix by a 3x1 matrix comprising 45,45,0?

What is the 3x3 matrix?

Ignore my attempt at

 :confused:

Thanks again for all your help.

[ code ] to properly close the block, you need / slash [ /code ]

V1= original vector, 3 components
M= a matrix with 3 columns and 3 lines, like the one you wrote above
V2= a new vector, which is V1 transformed by M

V1*M=V2

If V1 is aligned to an axis, it can be for example [1 0 0], so in V2 you will directly see the first line of the matrix.
For [0 1 0] it will be the second line, etc.

OK, see if I have this right.

I want to find the surface normals in x,y and z of a plane after a rotation.

Step 1: I take the three rotation matrices, and rotate them around different axes, by a set number of degrees. This means substituting 45^ for theta in each. I then multiply Rx by Ry by Rz. This gives me a 3 x 3 matrix.

Step 2: I then take the surface normals of the plane before I rotated it, 1,0,0 for vertical, or 0,0,1 for horizontal, and multiply this 3x1 matrix by a 3x3, giving me a 3x1 matrix.

This 3x1 matrix is n_x,n_y,n_z reading from top to bottom. Always.

?