# Learn 2-DIMENSIONAL GRAPHICS - 2D

## Impact of technology on education

## INTRODUCTION

The graphics packages range from the simple Windows Paint to the specialized AutoCAD and ANSYS. They all have the facility to change the shape or size or position or orientation of the displayed objects. Animations are produced by resizing an object or moving the object or camera along the animation path. All these concerns operate upon the object geometry by applying various geometric transformations like translation, rotation, and scaling. Each of these transformations is represented by specific transformation matrices, the nature and origin of which are demonstrated in this unit. The 2D point object is considered as representative of any graphic object.

## Transformation

This transformation is used to rotate objects about any point in a reference frame. Unlike translation rotation brings about changes in position as well as orientation. The point about which the object is rotated is called the pivot point or rotation point . Conventionally anti-clockwise rotation about the pivot point is represented by positive angular value. Such transformation can also be visualized as rotation about an axis that is perpendicular to the reference plane and passes through the pivot point.

## Reflection

A reflection is a transformation that produces a mirror image of an object. In 2D reflection

we consider any line in 2D plane as the mirror; the original object and the reflected object

are both in the same plane of the mirror line. However we can visualize a 2D reflection as

equivalent to a 3D rotation of 180o about the mirror line chosen. The rotation path being in

the plane perpendicular to the plane of mirror line. Here we will study some standard 2D

reflection cases characterized by the mirror line.

we consider any line in 2D plane as the mirror; the original object and the reflected object

are both in the same plane of the mirror line. However we can visualize a 2D reflection as

equivalent to a 3D rotation of 180o about the mirror line chosen. The rotation path being in

the plane perpendicular to the plane of mirror line. Here we will study some standard 2D

reflection cases characterized by the mirror line.

A reflection is a transformation that produces a mirror image of an object. In 2D reflection

we consider any line in 2D plane as the mirror; the original object and the reflected object

are both in the same plane of the mirror line. However we can visualize a 2D reflection as

equivalent to a 3D rotation of 180o about the mirror line chosen. The rotation path being in

the plane perpendicular to the plane of mirror line. Here we will study some standard 2D

reflection cases characterized by the mirror line.

we consider any line in 2D plane as the mirror; the original object and the reflected object

are both in the same plane of the mirror line. However we can visualize a 2D reflection as

equivalent to a 3D rotation of 180o about the mirror line chosen. The rotation path being in

the plane perpendicular to the plane of mirror line. Here we will study some standard 2D

reflection cases characterized by the mirror line.

## HOMOGENEOUS COORDINATES AND COMBINATION OF TRANSFORMATION

We have seen how the shape, size, position and orientation of 2D objects can be controlled

by performing matrix operation on the position vectors of the object definition points. In

some cases, however a desired orientation of an object may require more than one

transformation to be applied successively. For illustration let us consider a case which

requires 90° rotation of a point

by performing matrix operation on the position vectors of the object definition points. In

some cases, however a desired orientation of an object may require more than one

transformation to be applied successively. For illustration let us consider a case which

requires 90° rotation of a point

This process of calculating the product of matrices of a number of different

transformations in a sequence is known as concatenation or, combination of transformations

and the resultant product matrix is referred to as composite or concatenated transformation

matrix. Application of concatenated transformation matrix on the object coordinates eliminates

the calculation of intermediate coordinate values after each successive transformation.

transformations in a sequence is known as concatenation or, combination of transformations

and the resultant product matrix is referred to as composite or concatenated transformation

matrix. Application of concatenated transformation matrix on the object coordinates eliminates

the calculation of intermediate coordinate values after each successive transformation.

## COMPOSITE TRANSFORMATION

This unit shows that any 2D geometric transformation can be expressed as 3 by 3 matrix operators so that any sequence of multiple transformations can be concatenated into asingle composite matrix. This is an efficient formulation for reducing computation.However, faster transformation can be performed by moving blocks of pixels (represent-ing a displayed object) in the frame buffer using bitBLT raster operations. This doesn'tentail matrix multiplication to find transformed coordinates and applying scan conversion functions to display transformed object at new position.

A thorough understanding of 2D transformation mathematics is essential for graphics programmers as it shows how com-plex 3D viewing and geometric transformations should be carried out. The discussions inthis unit have been restricted to planar models. Real life effects can be brought using 3D transformations.