3-D Coordinate Vector Transformation
Date: 8/27/96 at 1:37:56 From: Anonymous Subject: 3-D Coordinate Vector Transformation What is the approach to take for transforming one coordinate system to another where it isn't just a translation transformation but also rotations and even reflections? The general case is where one would have two coordinate systems, each defined by its origin, and three orthogonal vectors defining x,y,z axes.
Date: 8/27/96 at 18:52:42 From: Doctor Tom Subject: Re: 3-D Coordinate Vector Transformation For details, get any book on 3D computer graphics, but here's the general idea: Add a fake "w" coordinate to make a 4D vector that looks like (x, y, z, w), and in every case, just make the w coordinate be 1. So the point (3, 5, 7) will be represented by (3, 5, 7, 1). Every one of the transformations you mention (rotation, translation, scaling, mirroring, (and even shearing, perspective transformations, and some other stuff) can be represented as a multiplication by the correct 4x4 matrix. Here are some examples: To rotate about the z axis by angle t, multiply by: | cos t sin t 0 0 | | -sin t cos t 0 0 | | 0 0 1 0 | | 0 0 0 1 | To mirror about the x-axis, multiply by: | -1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | 0 0 0 1 | To translate by 3 in x, 4 in y and 5 in z, multiply by: | 1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | 3 4 5 1 | To do combinations, multiply the appropriate combinations of matrices together. This is related to projective geometry in some very interesting ways, so after you've fiddled with the stuff above a bit, you might look into projective geometry to see what's "really" going on! Good luck. -Doctor Tom, The Math Forum Check out our web site! http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.