• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Graphics » Transformations » What is transformation? Type of transformation
Next →
← Prev

What is transformation? Type of transformation

By Dinesh Thakur

What is transformation? In  many  cases  a  complex  picture  can  always  be  treated as  a  combination  of  straight line, circles, ellipse etc., and if we are able to generate these basic figures, we can also generate combinations of them.  Once we  have drawn these pictures, the  need arises  to transform these pictures. 

We are  not essentially modifying the pictures, but a picture  in the center of the screen needs to be shifted to the top left hand corner, say, or a picture  needs to be increased to twice it’s size or a picture is to be turned through 900 .  In all these  cases, it  is  possible  to view  the  new  picture  as  really a  new  one  and use  algorithms  to  draw  them, but a better  method is, given their present  form, try to get  their  new counter  parts by operating on the existing data.  This concept is called transformation. 

The three basic transformations are

(i)                 Translation 

(ii)               rotation  and

(iii)             Scaling.

Translation  refers  to the  shifting of  a  point  to some  other  place, whose  distance  with regard to the  present  point  is known. Rotation as  the  name  suggests  is  to rotate  a  point  about an axis.   The axis can be any of the coordinates or simply any other specified line  also. Scaling is the concept of increasing (or decreasing) the size of a picture. (in one or  in either directions.  When  it  is done  in both directions, the  increase or decrease  in both directions  need not be same)   To change the size of the picture, we  increase or decrease  the distance between the end points of the picture and also change the intermediate points  are per requirements.

Translation: 

Consider a point P(x1 , y1 ) to be translated to another point Q(x2 , y2 ).  If we know  the point  value (x2, y2) we can directly shift to Q by displaying the pixel (x2, y2).  On the  other  hand, suppose we only know that we  want to shift by a distance of Tx along  x axis  and Ty along  Y axis.   Then obviously the coordinates can be derived by  x2 =x1 +Tx and  Y2 = y1 + Ty .

Suppose  we  want  to shift  a  triangle  with  coordinates  at  A(20,10), B(30,100) and C(40,70).   The  shifting to be  done  by  20 units  along  x  axis  and 10 units  along  y  axis. Then the new triangle will be at A1 (20+20, 10+10) B1  (30+20, 10+10) C1 (40+20, 70+10)  In the matrix form [x2 y2 1] = [x1 y1 1]    

                                                              Matrix

Rotation

Suppose we want to rotate a point (x1 y1) clockwise through an angle? about the origin of the coordinate system. Then mathematically we can show that

x2 = x1cos ? + y1sin? and

y2 = x1sin? – y1cos?

These equations become applicable only if the rotation is about the origin.

In the matrix for [x2 y2 1] = [x1 y1 1]

              Matrix 1

Scaling : Suppose we want the point  (x1 y1)  to be scaled by a factor sx and by a factor sy along y direction.

Then the new coordinates become  : x2 = x1 * sx and  y2 = y1 * sy

                Matrix 2

(Note that scaling a point physically means  shifting  a point away.   It does  not   magnify

the  point.   But  when  a  picture  is  scaled, each  of  the  points  are  scaled differently  and  hence the dimensions of the picture changes.)

You’ll also like:

  1. Difference Between Type Conversion and Type Casting
  2. Explicit Type Conversion (Type Casting)
  3. Abstract Data Type – What is an Abstract Data Type (ADT)?
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Computer Graphics Tutorials

Computer Graphics

  • CG - Home
  • CG - Introduction
  • CG - Applications
  • CG - Applications
  • CG - Raster Vs Random Scan Display
  • CG - Frame Buffer
  • CG - DVST
  • CG - CRT Display
  • CG - DDA
  • CG - Transformation
  • CG - Cathode Ray Tube
  • CG - Bresenham’s Line Algorithm
  • CG - Pixel
  • CG - Data Compression
  • CG - Clipping
  • CG - Shadow Mask CRT
  • CG - Line Drawing Algorithm
  • CG - Text Clipping
  • CG - Refresh Rates
  • CG - CRT/Monitor
  • CG - Interactive Graphics Display
  • CG - Raster Vs Random Scan System
  • CG - Liquid Crystal Display
  • CG - Scan Converting a Line
  • CG - Monitors Types
  • CG - Display Types
  • CG - Sutherland-Hodgeman Clipping
  • CG - Bitmap
  • CG - Antialiasing
  • CG - Refresh Rates
  • CG - Shadow Mask Vs Beam Penetration
  • CG - Scan Converting a Point
  • CG - Image Resolution
  • CG - Double Buffering
  • CG - Raster Vs Random Scan
  • CG - Aspect Ratio
  • CG - Ambient Light
  • CG - Image Processing
  • CG - Interactive Graphics Displayed
  • CG - Shadow Mask CRT
  • CG - Dithering
  • CG - GUI
  • CG - CLUT
  • CG - Graphics
  • CG - Resolutions Types
  • CG - Transformations Types
  • CG - Half-toning Effect
  • CG - VGA
  • CG - Aliasing
  • CG - CGA

Other Links

  • Computer Graphics - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW