Thursday 24 July 2014

Some Information about Computer Graphics and Transformation








What is Computer Graphics?


The meaning of the term Graphics is Graphical Tricks. Every image or picture is in fact a graph and when different mathematical tricks are used to manipulate some change in its properties like shape, size, motion etc., through the help of computers then, the representation is nothing but computer graphics, so we can say that “Computer Graphics refers to any sketch, drawing, special artwork or other material generated with the help of computer to pictorially depict an object or a process or otherwise convey information, as a supplement to or instead of written descriptions”.




What is 2D and 3D graphics?

 2D: 

- 2D is used to create flat digital images.
- X and Y horizontal and vertical axis are used in 2D.
- 2D graphics are used for printing and drawing applications.
- 2D graphics are vector based graphics.


3D:

- 3D graphics represents 3 dimensional representations of geometric data, such as length, breadth and       depth. 
- 3D graphics falls into 3 categories:


1. 3D modeling – the process of forming computer model of an object.
2. Layout and Animation – movement and placing and object in a scene are known as layout and animation.
3. 3D rendering – computer calculations that are based on light placement, surface types generate an image.


What is the difference between vector and raster graphics?

Raster Graphics:

- Raster graphics are composed of pixels.
- Raster graphic is an array of multicolor pixels those form an image.
- Raster graphic blocks images because each pixel increases the size of the image.

Vector Graphics: 

- Vector graphics are generated with paths.
- Every path comprises of lines that may be straight or curved.
- Vector graphics can be scaled without losing the image quality.

 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, or a picture needs to be increased to twice its 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:

 

-  Translation 

-  Rotation and

-  Scaling.

 

 1. Translation:

 

Translation is the process of changing the position of an object. Translation  refers  to the  shifting of  a  point  to some  other  place, whose  distance  with regard to the  present  point  is  known. Let an object point P(x,y)=xI+yJ be moved to P’(x’,y’) by the given translation vector V= txI + tyJ, where tx and ty is the translation factor in x and y directions, such that

P’=P+V.


         

 Example of Translation:



 

2. Rotation: 

 

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. A two-dimensional rotation is applied to an object by repositioning it along a circular path in the x-y plane. When we generate a rotation we get a rotation angle (θ) and the position about which the object is rotated (xr , yr) this is known as rotation point or pivot point. The transformation can also be described as a rotation about rotation axis that is perpendicular to x-y plane and passes through the pivot point. Positive values for the rotation angle define counter-clockwise rotations about the pivot point and the negative values rotate objects in the clockwise direction.

 Example of Rotation:


 

3. Scaling:


Scaling is the concept of increasing or decreasing the size of a picture. 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.


 Example of Scaling:


Reference : www.ecomputernotes.com

No comments:

Post a Comment