CGR Microproject
CGR Microproject
Micro Project On
“ Design colourful circles ”
Submitted By
Gaikwad Vishal Shivaji
Under The Guidance Of
Prof. shaikh k.f.
For The Subject
Computer Graphics
Department Of
Computer Science And Engineering
2023-24
1
CERTIFICATE
Shaikh k.f.
2
Acknowledgement
A project work of a great significance is not possible without
the help of several people, directly or indirectly. First and
foremost we have immense happiness in expressing our
sincere thanks to our guide, Ms. Shaikh k.f. for his valuable
suggestion, co-operating and continuous guidance.
3
Index
1. Introduction 05
2. Requirement 06
3. Snapshots 07
4. Code 08
5. Output of code 09
6. Reference 10
7. Conclusion 11
4
1. Introduction
Here is a C graphics program to draw colourful
circles on screen using graphics.h header file. In this
program, we will draw multiple circles on screen
with different sizes .
Initgraph:- initializes the graphics system by
loading the passed graphics driver then changing the
system into graphics mode.
Getmaxx:- returns the maximum X coordinate in
current graphics mode and driver.
Getmaxy: returns the maximum Y coordinate in
current graphics mode and driver.
“C:\\Turboc3\\BGI”:- This is the directory path where
BGI files are stored, This directory only work with Turbo C
(DOS) Editor.
delay();- delay function stored under dos.h for
holding the function for some time.
Getch();-to hold the output screen for some time
until the user passes a key from the keyboard to exit
the console screen.
5
2.Requirements
Hardware:
Processor : intel i3.
Ram : 4gb/8gb
Storage : 256gb
Software:
6
3.Snapshots
7
4.Code
1. #include<stdio.h>
2. #include<conio.h>
3. #include"graphics.h"
4. #include"stdlib.h"
5. void main()
6. {
7. intgd=DETECT,gm,i=0,x,xx,y,yy,r;
8. //Initializes the graphics system
9. initgraph(&gd,&gm,"c:\\tc\\bgi");
10. x=getmaxx();
11. y=getmaxy();
12. while(!kbhit())
13. {
14. i++;
15. // setfillstyle(random(i),random(30));
16.
17. circle(xx=random(x),yy=random(y),random(3
0));
18. setfillstyle(random(i),random(30));
19. floodfill(xx,yy,getmaxcolor());
20. delay(200);
21. }
22. getch();
23. }
8
5. output of code
9
6. Reference
The reference from internet, following
websites,links have been used in the completion of
this project file:
Websites:
https://www.javatpoint.com
https://www.softpedia.com
https://thesmolt.com
Computer graphics.
10
7.Conclusion
In this project, we drawn the colourful circles with
different sizes and program is executed .
11