__Computer Graphics__

*:-***Computer graphics are graphics created using computers and the representation of image data by a computer specifically with help from specialized graphic hardware and software.**

__Output Primitives__**Graphic SW and HW provide subroutines to**

*:-*describe a scene in terms of basic geometric structures called output primitives.Output primitives are combined to form complex structures.

Simplest primitives are

**>**Point (pixel)

**>**Line segment.

__Scan conversion__**The process of representing continuous graphics object as a collection of discrete pixels is called Scan Conversion.**

*:-*

__Scan converting a Line__**Scan converting a line means to draw pixels on an integer coordinate system in such a way that these pixels are as close to the actual line as possible. To draw a line we need two points, the starting point (x1,y1) of the line and the ending point (x2,y2). x1, y1,x2,y2 represents the coordinates of the points. Mathematically a line can be represented by the following slope intercept form:**

*:-*

*y = m x + c*

This equation is used to find any point on the line and is true for all the points on the line. Here

**x**is the x coordinate of the point.

**y**is the y coordinate of the point.

**m**is the slope of the line.

**c**is the y intercept.

__Scan converting a Circle__**A circle is a geometric figure which is round, and can be divided into 360 degrees. A circle is a symmetrical figure which follows 8-way symmetry.**

*:-***8-Way symmetry:**Any circle follows 8-way symmetry. This means that for every point (x,y) 8 points can be plotted. These (x,y), (y,x), (-y,x), (-x,y), (-x,-y), (-y,-x), (y,-x), (x,-y).

**Drawing a circle:**To draw a circle we need two things, the coordinates of the centre and the radius of the circle.

**Radius:**The radius of a circle is the length of the line from the centre to any point on its edge.

**Equation of the circle:**For any point on the circle (x,y) and the centre at point (xc,yc), the equation of the circle is

Here

**r**is the radius of the circle. If the circle has origin (0,0) as its centre then the above equation can be reduced to

__2D-Transformation__**Transformation is the fundamental part of computer graphics.Transformation means repositioning any geomatric object to another location by translation,rotation,scaling or by by any other transformation technique.**

*:-*There are five types of transformation in computer graphics –

**>**Translation

**>**Rotation

**>**Scaling

**>**Reflection

**>**Shearing

**In Translation an object is displaced to a given distance and direction from its original position.**

*Translation :-***In Rotation an object is displaced by an angle θ in anticlockwise direction along x-axis w.r.t. origin.**

*Rotation :-***Scaling is the process of expanding or compressing the dimensions of an object.**

*Scaling :-***Reflection is defined as the mirror image/symmetry of a point w.r.t axis.**

*Reflection :-***Shearing is defined as tilting in a given distance.Shearing transformation distort the shape of an object.**

*Shearing :-*

__3D-Transformation__**3D-Transformation is similar to 2D Transformations, which used 3x3 matrices. 3D transformations use 4X4 matrices (X, Y, Z, W)**

*:-*

__Window to viewport mapping__

*:-***Window-to-Viewport**

**is the process of mapping or transforming a two-dimensional, world-coordinate scene to device coordinates.**

**mapping**

__Clipping__**Clipping is the process of cutting that part of the image which is to be displayed on the view port.**

*:-*It includes all the procedures tha identify whether a portion of a graphic object is within inside or outside to a specified region.This region is called clliping window.

## No comments:

## Post a Comment