You are on page 1of 18

MICRO PROJECT

Academic year
2023-24

Flying Balloons

Program: Computer Engineering Program code:CO3I

Course: Computer Graphics Course code: 22318


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. Purva Jagtap , Pushkar shinde , Devesh Chandiramani

Roll No. 31 32 33 of Third Semester of Diploma in Computer Engineering Of Institute,

VES POLYTECHNIC (Code: 0004) has completed the Micro Project satisfactorily in Subject –

Computer Graphics (22318) for the academic year 2023-2024 as prescribed in the curriculum.

Place: Chembur, Mumbai Enrollment No: 2200040349 - 51

Date: ……………………… Exam Seat No: 103223 - 103225

Subject Teacher Head of the Department Principal

Mrs. Jayashree Kamble


Seal of
Institution
INDEX

Academic year: 2023-2024 Name of the faculty: Mrs. Jayashree Kamble

Program code: CO3I Course & course code: CGR (22318)

Name of the candidate: Purva Jagtap , Pushkar shinde , Devesh Chandiramani

Roll No. 31 32 33 Enrollment No. 2200040349-51

Sr.No Content Page No.

4
1 Project Proposal

5
2 Action plan

6
3 Resource required

7
4 Introduction

8
5 Actual Procedure

11
6 Output

12
7 Skill developed

15
8 Evaluation sheet
Annexure – I

Micro-Project Proposal

Flying Balloons

1.0 Aim/Benefits of the Micro-Project


Make Flying Balloons with the help of computer graphics.

2.0 Course Outcomes Addressed


CO1. Manipulate visual and geometric information of images. [✓]
CO2. Implement standard algorithms to draw various graphics objects using C. [ ]
CO3. Develop program for 2D and 3D transformation [✓]
CO4. Use Projections to visualize objects on view plane. [ ]
CO5. Implement various clipping algorithm. [ ]
CO6. Develop programs to create curves using algorithm. [ ]

3.0 Proposed Methodology


• Discussion about topic with guide and among group members.
• Submission of project proposal.
• Collection of information.
• Writing the code for moving cycle.
• Check the working of the code for Flying balloons .
• Create a report.
• Representation.
• Editing and revising the content Report preparation.
• Submission of the microproject.
4.0 Action Plan
SR. Details of activity Planned Start Planned Name of Responsible
No. date Finish date Team Members

1 Choose Problem Statement 25/07/2023 01/08/2023 All Team Members

2 Finalization of project Title and 01/08/2023 08/08/2023 All Team Members


Scope

3 Design procedure (algorithm) 08/08/2023 14/08/2023 All Team Members

4 Draw flowchart 14/08/2023 21/08/2023 All Team Members

5 Coding 21/08/2023 17/10/2023 All Team Members

6 Report writing 17/10/2023 23/10/2023 All Team Members

7 Presentation 23/10/2023 20/10/2023 All Team Members

8 Demonstration of project and final 20/10/2023 17/11/2023 All Team Members


submission

5.0 Resources Required


Sr.No. Equipment Name with Broad Specification Remark (if any)

1 Computer (i3-i5 preferable),RAM minimum 2 GB and onwards

2 Windows XP/windows 7/linux version 5 or later

3 Turbo c version 3 or later with DOSBOX

Name of Team Members with Roll Nos.

Roll No. Name


31 Purva Jagtap

32 Pushkar Shinde Mrs. Jayashree Kamble


33 Devesh Chandiramani Name and Signature of Course Teacher
Annexure – II

Micro-Project Report
Flying Balloons
1.0 Rationale
In computer graphics, we use graphics header file which provides direct functions to draw
different co-ordinate shapes (like circle, rectangle, triangle, line etc.), Using these functions
only we can draw different object like cycle, mountains, sun etc. In this program, we will draw
a Flying balloon using lines and circles and using a for loop we will make the Balloons flying.

2.0 Aim/Benefits of the Micro-Project


Make a Flying balloons with the help of computer graphics

3.0 Course Outcomes Addressed


CO1. Manipulate visual and geometric information of images. [✓]
CO2. Implement standard algorithms to draw various graphics objects using C. [ ]
CO3. Develop program for 2D and 3D transformation [✓]
CO4. Use Projections to visualize objects on view plane. [ ]
CO5. Implement various clipping algorithm. [ ]
CO6. Develop programs to create curves using algorithm. [ ]

4.0 Literature Review


The provided code is a C program that uses the Turbo C graphics library to create a simple and
delightful animation of balloons floating on the screen. The code begins by including essential header
files, setting up constants, and defining a structure to represent the properties of each balloon, such as
its position.

The `draw Balloon` function is responsible for drawing a single balloon. It uses graphics functions to
create a red circle for the balloon body and a brown line for the rope. This function encapsulates the
visual representation of a balloon.

In the `main` function, the graphics environment is initialized, and the background color is set to blue.
It creates an array of `Balloon` structures to manage multiple balloons. These balloons are initially
positioned at the bottom of the screen, forming a visually appealing arrangement.
The main loop of the program allows for user interaction. It checks for keyboard input, specifically
the left and right arrow keys for moving the balloons horizontally. Additionally, it allows the user to
exit the program by pressing 'e' or 'E'.

Within the animation loop, the screen is cleared on each iteration, and all balloons are drawn and
moved upwards, creating the illusion of them floating. If a balloon goes off the top of the screen, it is
repositioned at the bottom to maintain a continuous animation.

A slight delay is introduced to control the animation speed, giving a pleasant visual effect.

In summary, this code combines the power of C programming and Turbo C's graphics library to create
an entertaining animation of balloons. It's a great example of how code can be used to produce visually
engaging and interactive content. The code is well-structured, with clear comments and a logical flow,
making it easy to understand and modify.

Functions used in this programs:


Functions Description
initgraph() It initializes the graphics system by loading the passed graphics driver
then changing the system into graphics mode.
cleardevice() It clears the screen, and sets current position of the pixel to (0,0).
line() It draws the straight line between two points on the screen.

rectangle() It draws a rectangle using diagonal points.

arc() It is used to draw arc in the program.

circle() It draws a circle with radius r and center at (x,y).


setcolor() It changes the current drawing color. Default color is white. Here we are
using color constants defined insides graphics.h header file.
delay() It is used to suspend execution of a program for M milliseconds.
closegraph() It unloads the graphics drivers and sets the screen back to text mode.
5.0 Actual Procedure Followed.

• Discussion about topic with guide and among group members

• Submission of project proposal


• Collection of information
• Writing the code for moving cycle
• Check the working of the code for moving cycle
• Create a report
• Representation
• Editing and revising the content Report preparation
• Submission of the microproject

Algorithm

Step 1 . Start
Step 2. Include the necessary header files for graphics and input handling.

Step 3. Define a constant `MAX_BALLOONS` to represent the maximum number of


balloons.

Step 4. Create a structure `struct Balloon` with `x` and `y` coordinates to represent a
balloon.

Step 5. Define a function `draw Balloon` that draws a balloon and its rope on the screen.

Step 6. In the `main` function:


6.1. Initialize the graphics mode using `initgraph`.
6.2. Set the background color to blue.
6. 3. Create an array `balloons` of `struct Balloon` to store information about multiple
balloons.
6.4. Initialize the positions of the balloons in a loop.
6.5. Enter an infinite loop (`while (flag == 1)`) to handle user input and animation:
a Check for keyboard input using `kbhit()`.
b Respond to arrow key presses to move the balloons left or right.
c Clear the screen using `cleardevice()`.
d Draw and animate each balloon:
e Draw a balloon at its current position.
f Move the balloon upwards.
g If the balloon goes off the top of the screen, reset its position to the bottom.
h Introduce a delay to control the animation speed using `delay(10)`.
i. Continue the loop until the user presses 'E' to exit the program (`flag = 0`).
j. Close the graphics mode and the window.

Step7.stop

Flowchart:
Code :
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <stdlib.h>
#include <graphics.h>

#define MAX_BALLOONS 5

struct Balloon {
int x, y;
};

void drawBalloon(int x, int y) {


int radius = 30;

// Draw the balloon body


setfillstyle(SOLID_FILL, RED);
setcolor(RED);
circle(x, y - radius - 10, radius);
floodfill(x, y - radius - 10, RED); // Fill the balloon body

// Draw the rope


setcolor(BROWN);
line(x, y - radius - 10, x, getmaxy()); // Rope
}

int main() {
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\Turboc3\\BGI");
int flag=1,i;
// Set the background color (e.g., blue)
setbkcolor(BLUE);

struct Balloon balloons[MAX_BALLOONS];


int numBalloons = 5; // Number of balloons initially

// Initialize the first balloon


for(i=0;i<numBalloons;i++)
{
balloons[i].x = 50+100*i;
balloons[i].y = getmaxy()+(50*(i%2));
}
while (flag==1)
{
// Handle keyboard input
if (kbhit())
{
char ch = getch();
if (ch == 75) { // Left arrow key
for (int i = 0; i < numBalloons; i++) {
balloons[i].x -= 10;
}
}
else if (ch == 77) { // Right arrow key
for (int i = 0; i < numBalloons; i++) {
balloons[i].x += 10;
}
}
else if(ch=='e'||ch=='E')
flag=0;
}

cleardevice();
// Draw all balloons
for (int i = 0; i < numBalloons; i++)
{
drawBalloon(balloons[i].x, balloons[i].y);
balloons[i].y--;

if (balloons[i].y < -30) {


balloons[i].y = getmaxy();
}
}

delay(10); // Delay to slow down the animation


}

closegraph();
return 0;
}

6.0 Actual Resources Used


Sr.No. Equipment Name with Broad Specification Remark (if any)

1 Computer (i5), RAM 8GB

2 Windows 11

3 Turbo c version 3 or later with DOSBOX


7.0 Outputs of the Micro-Projects
8.0 Skill Developed / learning out of this Micro-Project.

1. Designing: Designing of micro project with minimum required resources and at low cost.

2. Teamwork: Learned to work in a team and boost individual confidence.

3. Time Management: Timely completion of micro project as scheduled.

4. Data Analysis: Interpretation of data

5. Problem-solving: Develop good problem-solving habits.

6. Technical writing: Preparing a report of the proposed plan and final report.

9.0 Application of this Micro-Project

➢ We can create fine and commercial art


➢ Cartoon animation films
➢ Cartoon drawing, painting, logo designing.
➢ Gaming industry
➢ Entertainment
➢ Visualization
Annexure – III

Suggested Rubric for Assessment of Micro-Project


S. Characteristic Poor Average Good Excellent
No. to be ( Marks 1 - 3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
assessed
Relevance to Relate to very Related to Take care of at- Take care of
1
the course few LOs some least one more than
LOs CO one CO
Not more than At-least 5
Literature About 10
two sources relevant
review relevant
2 /information
very old sources, at least At –least 7 sources, most
reference 2 latest relevant
collection latest
sources, most
latest
Completion of
Completed less Completed 50 Completed 60 Completed
the
than 50% to 60% to more than
3 Target as per
80% 80 %
project
proposal
Sufficient and
appropriate
Data neither enough data Sufficient and Enough data
Analysis of organized nor generated but appropriate collected and
4 Data and presented well not organized enough data sufficient and
representation and not generated presenting data.
presented well. which is
organized and
but not used.
Well assembled
Just assembled Well assembled
with proper
and some and functioning
Quality of Incomplete functioning
codeis not parts. But no
5 Prototype/Mod Programming parts..
functioning creativity in
el code Creativity in
well. design and use
design and use
of graphics
of graphics
function
function
Nearly
Very short,
sufficient and
Details about
correct details Detailed, Very detailed,
methods, and
about methods, correct and correct, clear
conclusions
6 Report and conclusion. clear description of
omitted, some
Preparation but clarity is description of methods, and
details are
not there in methods and conclusions.
wrong
presentation. Conclusions.
Sufficient
Graphic
Description.
Major Includes major
information is information but
not included, not well Includes major Well
7 Presentation information is organized and information organized,
of the micro not well not presented and well includes major
project organized. well organized but information
not presented ,well presented
well
Replied to
Could not reply
considerable
to considerable
number of Replied Replied most
number of
8 Defense questions but properly to of the questions
question.
not very considerable properly
properly number of
question.
Annexure – IV

Micro Project Evaluation Sheet


Name of Student: Purva Jagtap, Pushkar Shinde, Devesh Chandiramani Enrollment No:
2200040349-351
Name of Program: Computer Engineering Semester: Third
Course Title: Computer Graphics Course Code: 22318
Title of the Micro-Project: Flying balloons
COs addressed by Micro Project:
A: Manipulate visual and geometric information of images. [✓]
B: Implement standard algorithms to draw various graphics objects using C. [ ]
C: Develop program for 2D and 3D transformation [✓]
D: Use Projections to visualize objects on view plane. [ ]
E: Implement various clipping algorithm. [ ]
F: Develop programs to create curves using algorithm. [ ]

Sr.
Characteristic to be Poor Average Good Excellent
No (Marks1-3 )
Sub Total
assessed (Marks 4-5 ) (Marks 6-8) ( Marks9-10)
.

(A) Process and Product Assessment (Convert Above Total marks out of 6 Marks)
1 Relevance to the course
Literature Review /
2
information collection
Completion of the Target as
3
per project proposal
Analysis of Data and
4
representation

5 Quality of Prototype/Model

6 Report Preparation
Individual Presentation / Viva (Convert above total marks out of 4 marks)
7 Presentation
8 Viva
Process and Product Assessment Individual Presentation / Viva Total Marks
Roll No. (6 Marks) (4 Marks) 10
31

32

33

Comments/Suggestions about team work/leadership/inter-personal communication (if any)


………………………………………………………………………………………………
……………………………………………………………………………………………..
……………………………………………………………………………………………..
……………………………………………………………………………………………..

Name and designation of the Teacher: Mrs.Jayashree Kamble (Lecturer)


Dated Signature:

You might also like