Micro Project CGR
Micro Project CGR
PROJECT REPORT
ON
SUBMITTED BY
Under guidance of
MR.V.G.LACHAKE
SANJIVANI K.B.P.POLYTECHNIC
KOPARGOAN-423603,DIST:AHMEDNAGAR
2022-2023
1|Page
Sanjivani Rural Education Society’s
CERTIFICATE
This is to certify that the project report entitled
Under our supervision and guidance for partial fulfillment of the requirement for
Diploma in Computer Technology affiliated to
Maharashtra State Board of Technical Education,
2|Page
ACKNOWLEDGMENT
We would take this opportunity to express our sincere thanks and gratitude to our
Project Guide Prof. V.G.LACHAKE Department of Computer Technology,
Sanjivani K.B.P.Polytechnic, Kopargaon. For his vital guidance and support in
completing this project. Lots of thanks to the Head of Computer technology
Department Mr. G.N. Jorvekar for providing us with the best support we ever had.
We like to express our sincere gratitude to Mr. A. R. Mirikar, Principal, Sanjivani
K. B. P. Polytechnic, Kopargaon for providing a great platform to complete the
project within the scheduled time.
Last but not the least; we would like to say thanks to our family and friends for
their never-ending love, help, and support in so many ways through all this time. A
big thanks to all who have willingly helped us out with their ability.
3|Page
INDEX
4|Page
PREFACE
OBJECTIVES
5|Page
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, animation etc. It's not like traditional C
programming in which you have to apply complex logic in your program and then
you end up with a lot of errors and warnings in your program. 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>.
Sample Graphics Code:
This program initializes graphics mode and then closes it after a key is
pressed. To begin with we have declared two variables of int type gd and gm for
graphics driver and graphics mode respectively, you can choose any other variable
name as you wish. DETECT is a macro defined in "graphics.h" header file, then
we have passed three arguments to initgraph function first is the address of gd,
6|Page
second is the address of gm and third is the path where your BGI files are present
(we have adjusted this accordingly where our turbo compiler is installed).
Initgraphfunction automatically decides an appropriate graphics driver and mode
such that maximum screen resolution is set, getch() helps us to wait until a key is
pressed, closegraph() function closes the graphics mode and finally return
statement returns a value 0 to main indicating successful execution of your
program.
(4)
Some of the function included in<graphics.h> used in our project:
i) Line function:
Declaration :- void line(int x1, int y1, int x2, int y2);
7|Page
all file operations into operations on streams of bytes, which may be
"input streams" or "output streams". Unlike some earlier programming
languages, C has no direct support for random-access data files; to
read from a record in the middle of a file, the programmer must create
a stream, seek to the middle of the file, and then read bytes in
sequence from the stream.
Sprint
If/else
Break
While
Struct
<conio.h>:
conio.h header used in c programming contains functions for
console input/output. Some of the most commonly used functions of
conio.h are clrscr, getch, getche, kbhit etc. Functions of conio.h can be
used to clear screen, change color of text and background, move text,
check if a key is pressed or not and many more. conio.h file is
provided by Borland turbo c compiler and GCC compiler doesn't
support it.
clrscr
getch
kbhit
8|Page
SOURCE CODE
#include <conio.h>
#include <graphics.h>
#include <stdio.h>
void taj_body();
void left_minars();
void right_minars();
void main()
{
// DETECT macros
taj_body();
left_minars();
right_minars();
getch();
9|Page
// Close the initialized gdriver
closegraph();
}
void taj_body()
{
// Main Base
// Main Finial
// Left Side
// Left Finial
10 | P a g e
// Left Vertical Line
// Left Tangent
// Divider
11 | P a g e
line(460, 650, 460, 585);
// Right Side
// Right Finial
// Right Tangent
12 | P a g e
// Lower Right Tangent
// Divider
13 | P a g e
line(890, 455, 860, 425);
}
void left_minars()
{
// 1st Step
// 2nd Step
// 3rd Step
14 | P a g e
line(90, 160, 100, 140);
// 1st Step
// 2nd Step
// 3rd Step
15 | P a g e
line(190, 460, 200, 385);
void right_minars()
{
// 2nd Step
16 | P a g e
line(1320, 330, 1260, 330);
// 3rd Step
// 2nd Step
17 | P a g e
line(1090, 555, 1190, 555);
// 3rd Step
18 | P a g e
OUTPUT
19 | P a g e
CONCLUSION
20 | P a g e
REFERENCE
https://youtube.be/VQ3iPT-HYQQ
https://youtube.be/NTbxgfGsWrg
21 | P a g e