CGR Micro Project
CGR Micro Project
DIPLOMA IN
Computer eng
NAME OF THE DEPARTMENT
Computer Science and Engineering
AFFILIATED TO
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION,MUMBAI
SUBMITTED BY
GUIDED BY
MEGHA DHOTRE
ACADEMIC YEAR
2023-2024
1
G.V.ACHARYA POLYTECHNIC , S H E L U
CERTIFICATE
MEGHA DHOTRE
2
G.V.ACHARYA POLYTECHNIC , S H E L U
CERTIFICATE
MEGHA DHOTRE
3
G.V.ACHARYA POLYTECHNIC , S H E L U
CERTIFICATE
MEGHA DHOTRE
4
G.V.ACHARYA POLYTECHNIC , S H E L U
CERTIFICATE
MEGHA DHOTRE
5
ACKNOWLEDGEMENT
6
TABLE CONTENT
AIM 8
1.
INTRODUCTION 8
2.
3.
LITERATURE 9
REVIEW
4.
I) BASIC 11
FUNCTION
SYNTAX
II)
SOFTWARE
AND
HARDWARE
REQURED
PROGRAM 17
5.
.OUTPUT 15
6.
CONCLUSION 16
7.
7
AIM
8
LITERATURE REVIEW
9
2) GRAPHICS: What are graphics? Graphics are visual images or
designs on some surface, such as a wall, canvas, screen, paper,
or stone to inform, present, or entertain. In contemporary use, it
contains a pictorial illustration of data, as in computer-aided
design and manufacture, in typesetting and the graphic arts, and
in educational and recreational software. Images that are
developed by a computer are called computer graphics.
10
BASIC FUNCTION SYNTAXES
11
PROGRAM CODE BUILDS IN TURBO C
COMPILER FOR ANIMATION :
#include <stdio.h>
#include <graphics.h>
#include <conio.h>
#include <dos.h>
void firstCrown() {
setfillstyle(SOLID_FILL, GREEN);
line(300, 40, 200, 100);
line(300, 40, 400, 100);
ellipse(300, 100, 180, 360, 98, 30);
floodfill(310, 50, WHITE);
}
void secondCrown() {
setfillstyle(SOLID_FILL, MAGENTA);
line(250, 125, 180, 160);
line(350, 125, 420, 160);
ellipse(300, 160, 180, 360, 120, 30);
floodfill(260, 130, WHITE);
}
void thirdCrown() {
12
setfillstyle(SOLID_FILL, GREEN);
line(230, 185, 150, 230);
line(360, 185, 440, 230);
ellipse(295, 230, 180, 360, 145, 30);
floodfill(250, 190, WHITE);
}
void trunk() {
setfillstyle(SOLID_FILL, BROWN);
line(280, 260, 280, 350);
line(320, 260, 320, 350);
line(280, 350, 320, 350);
floodfill(285, 340, WHITE);
}
int main() {
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TURBOC3\\BGI");
int i, n;
printf("Welcome to our tree animation!\n");
printf("Enter the number of times you want to change the color of
the tree: ");
scanf("%d", &n);
13
for (i = 0; i < n; i++) {
cleardevice();
firstCrown();
secondCrown();
thirdCrown();
trunk();
delay(1000); // Delay for 1 second (adjust as needed)
}
getch();
closegraph();
return 0;
}
14
Outputs of the Micro-Project SOME OUTPUT HAS
GIVEN BELOW :
15
CONCLUSION
16