Plane with four corner 3-D (x,y,z)

If I have a plane with four corner 3-D (x,y,z).. et ceteraa in a coordinate system, how do I translate and rotate it to a new coordinate system orthogonal to it. In other words, do I use the equations/matrices involving sines and cosines to translate the plane?

For instance...

I am not sure if I am doing this right, but do I add a fourth axis (x,y,z,w) and use a matrix to rotate it and transform it? Thank you.
 

HallsofIvy

Science Advisor
Homework Helper
41,665
857
"Translation" in an ordinary 2 or 3 dimensional coordinate system is not a linear transformation (because it does not map (0,0,0) to itself) and cannot be written as a matrix multiplication. You can, however, use "projective" coordinates. That is, as you said, adding a fourth coordinate, w, (not a fourth axis). For example, to translate a point (x,y,z) by <0, 3, -2> (that is (x,y,z) becomes (x,y+3, z-2)). Write the point as (x,y,z,1) and multiply By the matrix
[1 0 0 0][x]
[0 1 0 3][y]
[0 1 0-2][z]
[0 0 0 1][1]
Rotations, about (0,0,0) would use the upper left 3 by 3 area:
[cos t -sin t 0 0] [x]
[sin t cos t 0 0] [y]
[0 0 1 0] [z]
[0 0 0 1] [1]
rotates through an angle t about the z-axis.
In some operations it may be necessary to "renormalize": you may get something like (u, v, w, a) where a is not 1 and must divide each component by a to get back to (x, y, z, 1).
 
HallsofIvy said:
"Translation" in an ordinary 2 or 3 dimensional coordinate system is not a linear transformation (because it does not map (0,0,0) to itself) and cannot be written as a matrix multiplication. You can, however, use "projective" coordinates. That is, as you said, adding a fourth coordinate, w, (not a fourth axis). For example, to translate a point (x,y,z) by <0, 3, -2> (that is (x,y,z) becomes (x,y+3, z-2)). Write the point as (x,y,z,1) and multiply By the matrix
[1 0 0 0][x]
[0 1 0 3][y]
[0 1 0-2][z]
[0 0 0 1][1]
Rotations, about (0,0,0) would use the upper left 3 by 3 area:
[cos t -sin t 0 0] [x]
[sin t cos t 0 0] [y]
[0 0 1 0] [z]
[0 0 0 1] [1]
rotates through an angle t about the z-axis.
In some operations it may be necessary to "renormalize": you may get something like (u, v, w, a) where a is not 1 and must divide each component by a to get back to (x, y, z, 1).
Okay, so this is how I did it.
I have Point P(x,y,z), and I have to rotate it around the z axis. To find the new x,y,z points I use the following equations

X' = xcos(alpha) + ysin(alpha)
Y' = -xsin(alpha) + ycos(alpha)

where alpha is the angle between x and X'

Then, I have to rotate the point around the X' axis...

angle beta is the angle from Y' to normal of X'

Y'' = Y'cos(beta) + Z'sin(beta)
Z'' = -Y"sin(beta) + Z'cos(beta)
X'' = X'

P(X'',Y'',Z'') is the end result. Are my equations correct?

Basically, I had to rotate some global coordinate axis to a local coordinate axis.

global
y
^
|
|
|
|
._ _ _ _ _ _ > x
z (pointing out of the page)

local
z''
^
|
|
|
|
._ _ _ _ _ _ > y''
x'' (pointing out of the page)

Furthermore, are there any equations I can use to project a grid on the axes numerically?

Thank you
 
Last edited:

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top