Translation
In 3D programming translation is often represented as a matrix. The following matrix translates a point by a vector
.
The matrix for translation is given below (notice that only points can be translated, not vectors)
The inverse of the matrix is simply T(-t).
In OpenGL you can do translation on objects with the following two lines of code. The first line sets that it’s the modelview matrix that you want to perform calculations on.
glMatrixMode(GL_MODELVIEW); glTranslatef(tx, ty, tz); |
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI





















