You are on page 1of 7

Computer Graphics

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

2.2 Course Outcomes Addressed: -


• Manipulate visual and geometric Information of images.
Implement standard algorithm to draw various graphics object using C program.
* Develop programs for 2D and 3D transformation.
Use projections to visualize objects on the view plane.
Implement various clipping algorithms.
Develop programs to create curves using the algorithms.

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

2.4 Actual methodology followed: -


1) Discussion with our subject teacher about micro project.
2) Searching of project topics on internet.
3) Selection of project topic.
4) To collect basic information about project.
5) Discussion with group members about requirements:
6) To divide work into group members.
7) To start actual working on project with proper knowledge.
8) To take guidance of teacher to remove mistakes.
9) Successful completion of project.
10) Submission of project.

2.5 Resources Required: -


Sr. Resources Specification Quantity Remarks
No. s

1 Computer RAM -2GB, 1 -


System System with
Main
Requirements
2 Reference Computer 1 -
Book Graphics
Textbook

3 Software Microsoft - -
Package Word,
TurboC++

4 Web Google - -
Browser Chrome

P.V.P.I.T, Budhgaon.
Computer Graphics

2.6 ‘C’ Program: -


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>
int main()
{
int gdriver = DETECT,gmode, a,b,i,r,x,y;

initgraph(&gdriver,&gmode,"C:\\TC\\BGI");

//draw the bottom rectangle


setfillstyle(SOLID_FILL,1);
rectangle(10,320,200,340);
floodfill(11,321,15);
rectangle(30,300,175,320);
floodfill(31,301,15);
rectangle(50,280,155,300);
floodfill(51,281,15);
//pole
setfillstyle(SOLID_FILL,3);
rectangle(100,38,110,280);

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

2.8 Skill Developed: -

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.

2.9 Application of this micro-project: -


This project base can be used to make building model and to get a before and after look
of the implemented use, Computer Graphics has a huge scope this is one of the important
term in it. Where we can develop the code using bar and other functions of graphics.

2.9Area of future Improvement: -


There is some lag in the bar "fill style and it can be improved by programmers in further
As using of this can lead to full fill the boundaries and get the outcome. If this can be
implemented then there will be simpler to use of function in a single set.

P.V.P.I.T, Budhgaon.

You might also like