Professional Documents
Culture Documents
2.1 Rationale: -
Computer graphics are pictures and films created using computers. Usually, the term
refers to computer-generated image data created with the help of specialized graphical
hardware and software. It is a vast and recently developed area of computer science. The
phrase was coined in 1960, by computer graphics researchers Verne Hudson and William
Fetter of Boeing. It is often abbreviated as CG, though sometimes erroneously referred to
as computer-generated imagery (CGI).
Some topics in computer graphics include user interface design, sprite graphics,
rendering, geometry processing, computer animation, vector graphics, 3D modeling,
shades, GPU design, implicit surface visualization with ray tracing, image processing,
computational photography, scientific visualization, and computer vision, among others.
The overall methodology depends heavily on the underlying sciences of geometry, optics,
physics, and perception.
Computer graphics is responsible for displaying art and image data effectively and
meaningfully to the consumer. It is also used for processing image data received from the
physical world. Computer graphics development has had a significant impact on many
types of media and has revolutionized animation, movies, advertising, video games, and
graphic design in general
P.V.P.I.T, Budhgaon.
Computer Graphics
Literature review: -
Building a structure using different shapes and styles the basic things for Computer
Graphics are
stated below
1. initgraph - It initializes the graphics system by loading the passed graphics driver then
changing the system into graphics mode
2. getmaxxy - it returns the maximum X coordinate in current graphics mode and driver
3. circle - Draws a circle with radius r and Centre at (x, y).
4 outtextxy - Displays a string at a particular point (x, y) on screen.
5. getmaxy - it returns the maximum Y coordinate in current graphics mode and driver
6. setcolor - It changes the current drawing color. Here the default color is taken as white.
Every color associated with this is assigned with a number for example are BLACK-O,
RED-4 etc.
7. closegraph. It unloads the graphics drivers and sets the screen back to text mode
P.V.P.I.T, Budhgaon.
Computer Graphics
3 Software Microsoft - -
Package Word,
TurboC++
4 Web Google - -
Browser Chrome
P.V.P.I.T, Budhgaon.
Computer Graphics
initgraph(&gdriver,&gmode,"C:\\TC\\BGI");
P.V.P.I.T, Budhgaon.
Computer Graphics
floodfill(101,39,15);
//draw the top rectangle
setfillstyle(SOLID_FILL,RED);
rectangle(110,40,220,58);
floodfill(111,43,15);
setfillstyle(SOLID_FILL,15);
rectangle(110,58,220,78);
floodfill(111,59,15);
setfillstyle(SOLID_FILL,GREEN);
rectangle(110,78,220,98);
floodfill(111,79,15);
//Ashok chakra
//
a=160;
b=68;
r=13;
setcolor(BLUE);
circle(a,b,r);
for(i=0;i<=360;i=i+25)
{
x=r*cos(i*3.14/180);
y=r*sin(i*3.14/180);
line(a,b,a+x,b-y);
}
getch();
return 0;
closegraph();
P.V.P.I.T, Budhgaon.
Computer Graphics
2.7 Output: -
P.V.P.I.T, Budhgaon.
Computer Graphics
Learning and implementing of Computer Graphics. Using different shapes and color fill
logic to fill the inner part and using key to push to next step: Key is called directly after
execution of first part. Like a loop is called adding bar as rectangles and etc.
P.V.P.I.T, Budhgaon.