





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to transformations in computer graphics, focusing on 2-d transformations, linear algebra, and homogeneous coordinates. Transformations are functions applied to points in space, making modeling more convenient and enabling efficient implementation of graphics systems. Linear algebra is used to represent points as vectors and understand the properties of transformations. Homogeneous coordinates are added to vectors to represent them in projective space, allowing for matrix formulation of transformations.
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Transformations are functions applied to points in space
Provide a mechanism for manipulating geometric models
Transformations are essential pieces of graphics systems
p ' = f ( p )
Makes modeling more convenient
Model viewing process via transformations
Animation
We represent points as vectors p = [ x y z ]
combination of the others
whose linear combinations include all vectors in the space
p
q
p+q
! p +" q
standard basis for 2 - D plane: 1 2
e e
We’ll be specifically interested in linear transformations
And the related class of affine transformations
f (! p + " q ) =! f ( p ) +" f ( q )
f ( p + !( q " p ) ) = f ( p ) +! f ( q " p )
First, write points in polar coordinates
And solve for the new positions
Can write this as a vector equation as well
cos sin
' cos( ) ' sin( )
x y
x y
! "! "
! " #! " #
= =
= + = +
θ
φ
x
y
x
y
' cos sin
' sin cos
x x y
y x y
or
' cos sin
' sin cos
x x
y y
p = Rp
We can represent any affine transformation as a sequence of these 3
Translation is only one not represented as matrix multiplication
Translation:
Scaling:
Rotation:
p p d
p Sp
p Rp
Let’s add an extra dimension to our vectors
To convert back, divide by w and drop the last coordinate
So what does this do to our transformation equations?
position: direction:
x a
x a
y b
y b
or
x s x
y t y
p = Sp
Scaling
or
' cos sin
' sin cos
x x
y y
!!
!!
p = Rp
Rotation
or
x x x
y y y
p = Tp
Translation
original R = rotate(60°) S = scale(1.3, 0.5) T = trans(0.2, 0.2)
What order of R , S , T
will produce this figure?
(a) TRSv
(b) RSTv
(c) TSRv
(d) RTSv
(b) RSTv
(c) TSRv (d) RTSv
(a) TRSv
OpenGL maintains a current transformation matrix M
Example: to rotate about an arbitrary point p = [ x y ]
glTranslatef(x, y, 0); // (3) move p back
glRotatef(theta, 0, 0, 1); // (2) rotate around z axis
glTranslatef(-x, -y, 0); // (1) move p to origin
DrawSomething();
We’ve consistently written points as column vectors
[[ a b ] [ c d ]]
Some in graphics have traditionally used row vectors
ABv → ( ABv )
T = v
T B
T A
T
[[ a c ] [ b d ]]
x a b x
y c d y
a c
x y x y
b d