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

CGFINAL

This document discusses the implementation of a pie chart using computer graphics. The objectives are to allow user input of discrete data and display it in a pie chart. A pie chart is a circular graphic divided into slices proportional to the quantities being displayed. The methodology uses C programming functions like getmaxx, getmaxy, and setfillstyle to determine screen dimensions and color the slices. A flowchart shows the process of welcoming the user, getting input values, and displaying the pie chart. The discussion concludes that though difficulties were faced, the program was successfully compiled and run to generate pie charts with real world applications.

Uploaded by

bibek gyawali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

CGFINAL

This document discusses the implementation of a pie chart using computer graphics. The objectives are to allow user input of discrete data and display it in a pie chart. A pie chart is a circular graphic divided into slices proportional to the quantities being displayed. The methodology uses C programming functions like getmaxx, getmaxy, and setfillstyle to determine screen dimensions and color the slices. A flowchart shows the process of welcoming the user, getting input values, and displaying the pie chart. The discussion concludes that though difficulties were faced, the program was successfully compiled and run to generate pie charts with real world applications.

Uploaded by

bibek gyawali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

INTRODUCTION

1.1 Background
Computer graphics is an art of drawing pictures, lines, charts, etc. using computers with the help
of programming. Computer graphics is made up of number of pixels. Pixel is the smallest
graphical picture or unit represented on the computer screen. Basically there are two types of
computer graphics namely. Computer Graphics used routinely in such diverse areas such as
science, engineering, medicine, business, industry, government, art, entertainment, advertising,
education, training, etc.
A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to
illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently
its central angle and area), is proportional to the quantity it represents. While it is named for its
resemblance to a pie which has been sliced, there are variations on the way it can be presented.

1.2 Objectives
The main objectives of this project is:

 To implement user input discrete data in pie chart using graphics

1.3 Application
Pie charts are generally used to show percentage or proportional data and usually the percentage
represented by each category is provided next to the corresponding slice of pie. Pie charts are
good for displaying data for around 6 categories or fewer.
It is generally used to analyze data statistically in Business, sales,etc.

1
2. METHODOLOGY
This project was done with the help of C-Programming Language. Different methods are
performed in order to make it more applied and efficient. C Graphics programming is very easy
and interesting. We used graphics programming for developing our projects, for designing. In C
graphics programming you have to use standard library functions (need not worry if you don't
know functions) to get your task done. Just you pass arguments to the functions and it's done. 
Many graphic functions are coded on its header file <graphics.h>.

Some of the function included in< graphics.h> used in our project:

i) getmaxx and getmaxy function:

Since presentation of pie chart is very important this function has been used to determine centre
of output screen.

ii) setfillstyle function:

This function has been used to fill colors in slice of piechart.

vii) pieslice():

This function has been used to generate segment of piechat ..

2
3.FLOWCHART

Start

Welcome screen

Enter Piechart Title

Enter no of element

Enter element value

Display Piechart

END

Fig:-Flowchart showing sequence of process.

3
4. DISCUSSION AND CONCLUSION
This project is one of the sample project on Computer Graphics. Though many difficulties were
faced during the project as well as many errors occurred, we became succeed to compile and run
the program. There may be some limitations on this project as well, so, in the near future we
would like to be hopeful in further improvements.

We aimed it to be an interfacing application to the real world that means our project must not be
a project for any examination but also applicable for real world use. We are able to provide an
application for people to share joy with the help of our game. From this very project we were
able to achieve various knowledge in computer graphics and also in logical coding.

4
Contents
ACKNOWELEDGEMENT…………………………………………………….………………….i

1. INTRODUCTION...................................................................................................................................1
1.1 Background.......................................................................................................................................1
1.2 Objectives..........................................................................................................................................1
1.3 Application.......................................................................................................................................1
2. METHODOLOGY..................................................................................................................................2
3.FLOWCHART.........................................................................................................................................3
4. DISCUSSION AND CONCLUSION......................................................................................................4

You might also like