Docsity

pie chart design for computer engineering, Exercises of Computer science

Toggle sidebar
bg1
Lab Report No: 04
Lab Report Name: Pie chart drawing using computer graphics.
Objective:
Develop a computer graphics program for drawing pie charts, aiming to implement an efficient
algorithm for accurate pie segment rendering. Key objectives include creating a user-friendly
interface for inputting data and customizing chart attributes, implementing an optimized pie
chart algorithm, ensuring real-time interactivity, providing options for color customization, and
maintaining compatibility across various platforms. The goal is to offer a versatile tool that
allows users to visually represent data through clear and visually appealing pie charts.
Description:
The Pie Chart Drawing computer graphics program facilitates the creation of visually informative
and customizable pie charts on digital displays. Employing intuitive user interfaces, users can
input data values, labels, and customize attributes such as colors and styles. The program
dynamically renders pie slices proportionate to the input data, offering real-time visualization.
With optimized algorithms and error handling, this tool ensures accuracy and reliability in pie
chart generation. Comprehensive documentation and compatibility across platforms contribute
to a user-friendly experience, making it an effective solution for conveying data through visually
compelling pie charts.
Coding:
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
int main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, " ");
setfillstyle(SOLID_FILL,RED);
pieslice(300,300,0,120,150);
outtextxy(400,160,"Mrinal");
setfillstyle(SOLID_FILL,GREEN);
pieslice(300,300,120,160,150);
outtextxy(140,180,"khalid");
setfillstyle(SOLID_FILL,YELLOW);
pieslice(300,300,160,200,150);
outtextxy(90,290,"Rahman");
setfillstyle(SOLID_FILL,BLUE);
pieslice(300,300,200,360,150);
outtextxy(400,420,"Abdur");
//setfillstyle(SOLID_FILL,BLUE);
//pieslice(300,300,260,360,150);
pf2

Partial preview of the text

Download pie chart design for computer engineering and more Exercises Computer science in PDF only on Docsity!

Lab Report No: 04

Lab Report Name: Pie chart drawing using computer graphics.

Objective:

Develop a computer graphics program for drawing pie charts, aiming to implement an efficient

algorithm for accurate pie segment rendering. Key objectives include creating a user-friendly

interface for inputting data and customizing chart attributes, implementing an optimized pie

chart algorithm, ensuring real-time interactivity, providing options for color customization, and

maintaining compatibility across various platforms. The goal is to offer a versatile tool that

allows users to visually represent data through clear and visually appealing pie charts.

Description:

The Pie Chart Drawing computer graphics program facilitates the creation of visually informative and customizable pie charts on digital displays. Employing intuitive user interfaces, users can

input data values, labels, and customize attributes such as colors and styles. The program dynamically renders pie slices proportionate to the input data, offering real-time visualization.

With optimized algorithms and error handling, this tool ensures accuracy and reliability in pie chart generation. Comprehensive documentation and compatibility across platforms contribute

to a user-friendly experience, making it an effective solution for conveying data through visually compelling pie charts.

Coding: #include<graphics.h> #include<stdio.h> #include<conio.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, " "); setfillstyle(SOLID_FILL,RED); pieslice(300,300,0,120,150); outtextxy(400,160,"Mrinal");

setfillstyle(SOLID_FILL,GREEN); pieslice(300,300,120,160,150); outtextxy(140,180,"khalid");

setfillstyle(SOLID_FILL,YELLOW); pieslice(300,300,160,200,150); outtextxy(90,290,"Rahman");

setfillstyle(SOLID_FILL,BLUE); pieslice(300,300,200,360,150); outtextxy(400,420,"Abdur");

//setfillstyle(SOLID_FILL,BLUE); //pieslice(300,300,260,360,150);

//outtextxy(400,420,"Afsana"); getch(); closegraph(); return 0; } Working Environment:

Output:

Conclusion: The Pie Chart Drawing computer graphics program successfully meets its objectives, offering an efficient and user-friendly solution for creating visually compelling pie charts. Through intuitive interfaces, interactive drawing features, and optimized algorithms, the program provides a versatile tool for representing data visually. With customization options and compatibility across platforms, it stands as an effective resource for users seeking to generate informative and aesthetically pleasing pie charts in the realm of computer graphics.