0% found this document useful (0 votes)
82 views

Introduction To Computer Graphics

Computer graphics involves using computers to create and manipulate visual images. It can be used to create 2D and 3D models, pictures, graphs, and other visual representations that are used for research, education, training, visualizations, and entertainment. Common types of computer graphics include raster graphics which use pixels to form images, and vector graphics which use mathematical formulas to draw shapes. Computer graphics has many applications, including computer-aided design, presentations, video games, movies, and creating user interfaces.

Uploaded by

shubhamnaik9290
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)
82 views

Introduction To Computer Graphics

Computer graphics involves using computers to create and manipulate visual images. It can be used to create 2D and 3D models, pictures, graphs, and other visual representations that are used for research, education, training, visualizations, and entertainment. Common types of computer graphics include raster graphics which use pixels to form images, and vector graphics which use mathematical formulas to draw shapes. Computer graphics has many applications, including computer-aided design, presentations, video games, movies, and creating user interfaces.

Uploaded by

shubhamnaik9290
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/ 5

Computer Graphics

Introduction To Computer Graphics


Computer Graphics involves technology to access. The Process transforms and presents
information in a visual form. The role of computer graphics insensible. In today life, computer
graphics has now become a common element in user interfaces, T.V. commercial motion pictures.

Computer Graphics is the creation of pictures with the help of a computer. The end product of the
computer graphics is a picture it may be a business graph, drawing, and engineering.

In computer graphics, two or three-dimensional pictures can be created that are used for research.
Many hardware devices algorithm has been developing for improving the speed of picture
generation with the passes of time. It includes the creation storage of models and image of objects.
These models for various fields like engineering, mathematical and so on.

Today computer graphics is entirely different from the earlier one. It is not possible. It is an
interactive user can control the structure of an object of various input devices.

Computer Graphics refers to several things:


 The manipulation and the representation of the image or the data in a graphical
manner.
 Various technology is required for the creation and manipulation.
 Digital synthesis and its manipulation.

Definition of Computer Graphics:


It is the use of computers to create and manipulate pictures on a display device. It comprises of
software techniques to create, store, modify, represents pictures.

Types of Computer Graphics


 Raster Graphics: In raster, graphics pixels are used for an image to be drawn. It
is also known as a bitmap image in which a sequence of images is into smaller
pixels. Basically, a bitmap indicates a large number of pixels together.
 Vector Graphics: In vector graphics, mathematical formulae are used to draw
different types of shapes, lines, objects, and so on.

Text mode graphics functions: The text mode graphics functions place the text in certain
area of the screen. Those functions are included in the header file <conio.h>. Some of those text
mode graphics functions are:

Sharad Institute Of Technology, Polytechnic Page 1


Computer Graphics

 clrscr(): It is used to clear the screen and locates the curser at the beginning of the screen.
 gotoxy(x,y): it moves the curser at specified co-ordinates (x,y) position.
 cputs(string): it writes a string given to function to the user defined window screen.
 putch(char) : it writes a character given to function to the user defined area of window.

Graphical mode functions:

There are so many graphical functions in C graphics library. All the graphics mode functions are
in <graphics.h> file. So we must include the graphics.h file to use those functions. To run a c
program in graphical mode the most important functions are as below.

 initgraph(): it is one of the function that is used to initialize the computer in graphics mode.
Its syntax is as

initgraph(&gdriver, &gmode, "graphics driver path");

 closegraph(): It is the graphical function that is used to close the graphics mode initialized
by the initgraph() function.
 graphresult(): it is a graphical function that returns the value 0 if the graphics is detected
correctly and the driver is correctly initialized to correct graphics mode other wise it returns
some error code than 0.
 grapherrormsg(errorcode): This function returns the message string corresponding to the
errorcode returned by the graphresult() function.
 cleardevice(): This function is used to clear the screen in graphical mode as clrscr() in text
mode.

 setcolor(color): It is a function that is used to set the color of the drawing object with given
color. The color is indicated by the integer from 0 to 15 ( 16 color
 moveto(x, y): it is used to move the cursor in display screen at specified co-ordinates by the
value (x,y).
 outtext(" text string "): prints the text string in the current position of screen.
 outtextxy(x, y, "string"): prints the string from the co-ordinate (x,y) position.
 lineto(x, y): draws the line from current position to (x,y) position.
 putpixel(x, y, color): displays a pixel(point) at (x,y) with given color.
 line(a, b, c, d): draws line from (a,b) to (c,d).
 circle(x, y, r): prints circle with center (x,y) and radius r.
 rectangle(a, b, c, d): prints rectangle where (a,b) is upper left coordinate and (c,d) is lower
right co-ordinates of rectangle.

Some Algorthms Of Computer Graphics That Basically used

1. DDA Line Drawing Algorithm

Sharad Institute Of Technology, Polytechnic Page 2


Computer Graphics

2. Bresenham’s Line Draving Algorithm


3. Bresenham’s Circle Draving Algorithm
4. Polygon Filling Algorithm using Flood Fill
5. Polygon Filling Algorithm using Bondary Fill
6. Cohen Sutherland Algorithm for Line Clipping
7. Midpoint Subdivision Algorithm for Line Clipping
8. Sutherland-Hodgeman Algorithm for Polygon Clipping

Applications
1. Computer Art:
Using computer graphics we can create fine and commercial art which include
animation packages, paint packages. These packages provide facilities for designing
object shapes and specifying object motion.Cartoon drawing, paintings, logo design
can also be done.

2. Computer Aided Drawing:


Designing of buildings, automobile, aircraft is done with the help of computer aided
drawing, this helps in providing minute details to the drawing and producing more
accurate and sharp drawings with better specifications.

3. Presentation Graphics:
For the preparation of reports or summarising the financial, statistical,
mathematical, scientific, economic data for research reports, managerial reports,
moreover creation of bar graphs, pie charts, time chart, can be done using the tools
present in computer graphics.

4. Entertainment:
Computer graphics finds a major part of its utility in the movie industry and game
industry. Used for creating motion pictures , music video, television shows, cartoon
animation films. In the game industry where focus and interactivity are the key
players, computer graphics helps in providing such features in the efficient way.

5. Education:
Computer generated models are extremely useful for teaching huge number of
concepts and fundamentals in an easy to understand and learn manner. Using
computer graphics many educational models can be created through which more
interest can be generated among the students regarding the subject.

6. Training:
Specialised system for training like simulators can be used for training the
candidates in a way that can be grasped in a short span of time with better

Sharad Institute Of Technology, Polytechnic Page 3


Computer Graphics

understanding. Creation of training modules using computer graphics is simple and


very useful.

7. Visualisation:
Today the need of visualise things have increased drastically, the need of
visualisation can be seen in many advance technologies , data visualisation helps in
finding insights of the data , to check and study the behaviour of processes around
us we need appropriate visualisation which can be achieved through proper usage of
computer graphics
8. Image Processing:
Various kinds of photographs or images require editing in order to be used in
different places. Processing of existing images into refined ones for better
interpretation is one of the many applications of computer graphics.

9. Machine Drawing:
Computer graphics is very frequently used for designing, modifying and creation of
various parts of machine and the whole machine itself, the main reason behind
using computer graphics for this purpose is the precision and clarity we get from
such drawing is ultimate and extremely desired for the safe manufacturing of
machine using these drawings.

10. Graphical User Interface:


The use of pictures, images, icons, pop-up menus, graphical objects helps in
creating a user friendly environment where working is easy and pleasant, using
computer graphics we can create such an atmosphere where everything can be
automated and anyone can get the desired action performed in an easy fashion.

Sharad Institute Of Technology, Polytechnic Page 4


Computer Graphics

Sharad Institute Of Technology, Polytechnic Page 5

You might also like