Title of Assignment: Problem Definition
Title of Assignment: Problem Definition
Problem Definition: Write C++ program to draw 2-D object and perform following basic
transformations, a) Scaling b) Translation c) Rotation
Learning Objective:
2D reflections about different axis and rotation with an arbitrary point.
Theory :
1. Translation
Moving object in horizontal or vertical direction is called as translation In a translation
transformation all the points in the object are moved in a straight line in the same direction. The
size, the shape and the orientation of the image are the same as that of the original object. Same
orientation means that the object and image are facing the same direction.
Translation matrix :
2. Rotation
A rotation is a transformation in which the object is rotated about a fixed point. The direction of
rotation can be clockwise or anticlockwise. The fixed point in which the rotation takes place is
called the centre of rotation. The amount of rotation made is called the angle of rotation.
Rotation matrix :
3. Scaling
Scaling is a kind of transformation in which the size of an object is changed. Remember the change
is size does no mean any change in shape. This kind of transformation can be carried out for
polygons by multiplying each coordinate of the polygon by the scaling factor. Sx and Sy which in
turn produces new coordinate of (x,y) as (x',y').
Scaling Matrix
here sx and sy are the scaling factors
Fig :Scaling
Conclusion::
In this way we have studied and implemented transformations :Translation, Rotation and
scaling