Re: undoing rotations and translations



Ron Francis a écrit :
Hi,

Please excuse my ignorance about matrices, but I want to know if something
is possible before I delve too much into them.
Basically, I'm rotating vertices around a point in space and an arbitrary
axis, or translating those points.
Currently, I'm performing all the actions in sequence rather than compiling
them into a matrix.

So the question is, is it possible to perform rotations or translations
several times and each time add the current matrix to the previous one so
that I can use one matrix to return the vertices to their original
positions?

you will have to use homogenous coordinates. You basically add a one to your (x,y,z) vector (so it becomes (x,y,z,1)), and use a 4x4 matrix for your transformations.
Now, a rotation matrix is written as a usual rotation matrix + one row and one column with (0,0,1). And a translation matrix is written as the identity matrix + one row and one column. The column is the vector of the translation + a one at the end.

To get the original point back, just inverse the matrix (which can be done with transposes and minus operations if you only have rotations and translations).

Google for homogenous coordinates, it will be better explained ;)

--
Nicolas Bonneel
http://www-sop.inria.fr/reves/Nicolas.Bonneel/
.



Relevant Pages

  • Re: Lineal algebra problem
    ... Is there a general procedure to do this with translations and ... The problem is that eye point and look-at point ...
    (comp.graphics.algorithms)
  • Special Conformal Transformations of Conformal Geometry
    ... I have an rough conceptual understanding of the 3 spatial ... translations, the 1 temporal translation, the 3 rotations, the 3 ... I am having trouble conceptualizing the remaining 4 "special conformal ... transformations", which appear to be combinations of translations, ...
    (sci.nonlinear)
  • Special Conformal Transformations of Conformal Geometry
    ... I have an rough conceptual understanding of the 3 spatial ... translations, the 1 temporal translation, the 3 rotations, the 3 ... I am having trouble conceptualizing the remaining 4 "special conformal ... transformations", which appear to be combinations of translations, ...
    (sci.math.research)
  • Re: Image Matching
    ... "Locating An Image At Arbitrary Scales, Translations, and Rotations " ... Or, check out the Image Registration entery in the Help file of MATLAB, if you have the image processing toolbox. ...
    (comp.soft-sys.matlab)
  • translation and rotation
    ... I've got the following code, that uses VK_NUMPAD (rotations), and F5-F9 ... (translations). ... Another question is how I could rotate in the X, ...
    (microsoft.public.win32.programmer.directx.graphics)