Download graphics lecture notes part 1 and more Lecture notes Graphic Design in PDF only on Docsity!
Geometric Manipulation
Sibi Chakkaravarthy Sethuraman Asst. Professor Department of CSE VIT-AP University, Amaravati
Module 2
Module No. 2 Geometric Manipulation 8 hours
- Homogeneous coordinates
- Affine transformations (translation, rotation, scaling, shear)
- Concatenation
- Matrix stacks and
- Use of model view matrix in OpenGL for these operations
Basic transformations
- (^) Translation
- (^) Rotation
- (^) Scaling
Translate a triangle where A(2,5), B (7,10), C(10,2) by 3
units in x and 4 units in y
- (^) Obtain A’,B’,C’, where t (3,4) A’ = A+t A’ = + A’ =
All the transformation should be
treated in a consistent way
- (^) Translation addition
- (^) Rotation and Scaling multiplication
All the transformation should be
treated in a consistent way
- (^) This can only happen, if all the points are expressed in homogeneous coordinates.
- (^) Finally, in homogeneous coordinates, all the three transformation can be treated as multiplication.
Titan Xp
Homogeneous coordinates
- (^) Represents coordinates in 2 dimensions with a vector
- (^) Basically we are adding a 3 rd coordinate to every 2d point
- (^) Now (x,y) become (x,y,w)
If (x,y) become (x,y,w), then what is
(x,y,w)
- (^) (x,y,w) = (x/w,y/w)
- (^) x,y implies 2d dimensional vector, now we are diving with 3rd^ coordinate point
- (^) W cannot be 0 because (x,y,0) infinity i.e., (x/0,y/0)
- (^) (0,0,0) is not allowed 2,1, 2,1, 4,2,2 6,3,
Matrix representations of Translation,
rotation and scaling
Translation P’ = T+P = + Rotation P’ = R(θ).Pθ).P).P =. Scaling P’ = S.P =.
How to clip the book region?
How to clip the photo region?
Which image gives the face
context?
Affine transformation
- (^) Till now we have learned about lot of subsets (rotation, scaling, translation) of transformation.
- (^) Affine transformation are transformation which preserve the parallelism between the lines in a image/model.
- (^) Consider an example, if you apply affine transformation in an image and when you compare the output of the affine transformed image with the input image. You can notice that the parallelism between the image (input & output) is preserved.