0% found this document useful (0 votes)
42 views3 pages

Title of Assignment: Problem Definition

This document discusses 2D transformations that can be performed on objects in a C++ program. It defines translation as moving an object in a straight line without changing its size, shape, or orientation. Rotation is defined as rotating an object around a fixed point by some angle. Scaling is defined as changing the size of an object without altering its shape. The document provides the theory behind translation, rotation, and scaling matrices and includes examples of applying each transformation to a triangle. The goal is for learners to write a C++ program that can draw 2D objects and perform these basic transformations.

Uploaded by

SONAL S.K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views3 pages

Title of Assignment: Problem Definition

This document discusses 2D transformations that can be performed on objects in a C++ program. It defines translation as moving an object in a straight line without changing its size, shape, or orientation. Rotation is defined as rotating an object around a fixed point by some angle. Scaling is defined as changing the size of an object without altering its shape. The document provides the theory behind translation, rotation, and scaling matrices and includes examples of applying each transformation to a triangle. The goal is for learners to write a C++ program that can draw 2D objects and perform these basic transformations.

Uploaded by

SONAL S.K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Title of Assignment: To perform 2D transformations

Problem Definition: Write C++ program to draw 2-D object and perform following basic
transformations, a) Scaling b) Translation c) Rotation

Prerequisite: Basic of 2D transformations

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 :

t r i a n g l e = { p1=(1 ,0) , p2=(2 ,0) , p3=(1.5 ,2) }


Fig: Translation of triangle

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 :

Fig : Rotation of triangle

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

You might also like