Program for Moving Ball
Submitted in fulfillment of requirements
of micro-project
Computer Graphics
By
“Aadie Gupta”
“Darshana Malusare”
“Gaurangi Madankar”
ROLL NO: - 55
56
57
ENROLLMENT NO: - 2209640226
2209640227
2209640228
SUBJECT INCHARGE
Mrs. Smita Kuldiwar
Computer Engineering Department
Academic Year 2023-2024
CERTIFICATE
This is to certify that the microproject
“Program for Moving Ball”
is done by
“Aadie Gupta”
“Darshana Malusare”
“Gaurangi Madankar”
is submitted for
“Computer Graphics”
for
the diploma in Computer Engineering to the
Maharashtra State Board of Technology Education, Mumbai
(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
___________ ____________
Subject In charge Head of Department
(Mrs. Smita Kuldiwar) (Mrs. Smita Kuldiwar)
Program for Moving Ball
Submitted in fulfillment of requirements
of micro-project
Computer Graphics
By
PROCESS AND INDIVIDUAL TOTAL
ROLL NAME ENROLLMENT PRODUCT PRESENTATION/ (10 marks)
NO NO ASSESMENT (6 WORK (4 marks)
marks)
55 AADIE 2209640226
GUPTA
56 DARSHANA 2209640227
MALUSARE
57 GAURANGI 2209640228
MADANKAR
SUBJECT INCHARGE
Mrs. Smita Kuldiwar
Computer Engineering Department
Academic Year 2023-2024
COMPUTER ENGINEERING DEPARTMENT
VISION AND MISSION OF THE PROGRAMME
VISION
To contribute to society through excellence in scientific & knowledgeable based
education of computer science professionals.
MISSION
M1: To transform students into technically components, socially responsible & ethical
computer science professionals.
M2: To promote a creative teaching-learning process that will strive for academic
excellence in the field of computer engineering.
M3: To enhance the technical expertise of students through workshop & industry-
institute interaction.
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME OUTCOMES
PO1: Basic and Discipline specific knowledge: Apply knowledge of basic
mathematics, science and engineering fundamentals and engineering specialization to
solve the engineering problems.
PO2: Problem analysis: Identify and analyse well-defined engineering problems
using codified standard methods.
PO3: Design/ Development of solutions: Design solutions for well-defined technical
problems and assist with the design of systems components or processes to meet
specified needs.
PO4: Engineering Tools, Experimentation and Testing: Apply modern engineering
tools and appropriate technique to conduct standard tests and measurements.
PO5: Engineering practices for society, sustainability and environment: Apply
appropriate technology in context of society, sustainability, environment and ethical
practices
PO6: Project Management: Use engineering management principles individually, as
a team member or a leader to manage projects and effectively communicate about
well-defined engineering activities.
PO7: Life-long learning: Ability to analyse individual needs and engage in updating
in the context of technological changes.
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME EDUCATIONAL OBJECTIVES
PEO1: Provide socially responsible, environment friendly solutions to
Computer engineering related broad-based problems adapting professional
ethics.
PEO2: Adapt state-of-the-art Computer engineering broad-based technologies
to work in multidisciplinary work environments.
PEO3: Solve broad-based problems individually and as a team member
communicating effectively in the world of work.
PROGRAMME SPECIFIC OUTCOMES
PSO1: Computer Software and Hardware Usage: Use state-of-the-art
technologies for operation and application of computer software and hardware.
PSO2: Computer Engineering Maintenance: Maintain computer engineering
related software and hardware systems.
Program for Moving Ball
Aim
Develop a program for moving ball.
Course Outcomes
1. Implementing standard algorithms to develop a program.
2. Applied Computer Programming knowledge to solve broad-based Computer
engineering related problems.
Proposed Methodology
First, Search the topic for which you want to make a project, and then propose it to
the Subject In charge.
After finalizing the topic, start gathering the information about your project.
Recheck the program with the subject in charge.
Now, it’s time to make a report of your Selected Project.
Action Plan
Sr. Detail of activity Plan Start Date Plan Finish Date
No.
1. Searching of Topic 25-09-2023 27-09-2023
2. Gathering Information 28-09-2023 30-09-2023
3. Report Making 11-10-2023 14-10-2023
Subject In-Charge
(Mrs. Smita Kuldiwar)
Program for Moving Ball
Rationale
Developing a program for moving a ball serves various educational and practical purposes. It
provides a hands-on approach for beginners to understand and apply fundamental
programming concepts such as variables, loops, and conditional statements. Additionally, it
introduces basic graphics and animation principles, serving as a practical introduction to
visual elements in programming. Implementing user input for controlling the ball introduces
the concept of event-driven programming, which is essential for creating interactive
applications.
Simulating the movement of the ball introduces basic physics concepts such as acceleration
and velocity, serving as an entry point to more advanced topics like collision detection. The
project also provides a simplified introduction to game development, covering aspects like
game loops, rendering, and real-time interaction. By developing the program, learners are
encouraged to identify and solve programming issues, developing problem-solving and
debugging skills. Optimizing the code for efficient ball movement introduces the importance
of performance optimization in programming.
Literature
When developing a program to move a ball, it is important to utilize a variety of valuable
resources from different fields, including game development, computer graphics, and
programming. By exploring areas such as game development, computer graphics, physics
simulation, programming languages and concepts, graphics programming, online resources,
documentation and coding standards, and version control, you can gain a comprehensive
understanding of the subject matter.
Exploring game development provides insights into the details of creating immersive and
interactive experiences. This involves understanding game loops, rendering techniques, and
real-time interaction, which are important for smooth and engaging ball movement.
Moreover, learning about graphics and animation principles helps you apply visually
appealing rendering techniques for displaying the ball on the screen. Concepts like frame
rate, smooth animation, and rendering optimization become natural as you dive deeper into
computer graphics.
Furthermore, programming languages and concepts are important in developing a ball-
moving program. By learning a programming language like C++, you can apply
programming basics like variables, data types, and control structures. This helps you make
the ball move, handle user input like keyboard and mouse, and fix issues with ball movement,
physics, and user input.
Understanding game loops and timing is important to keep the ball moving smoothly.
Optimizing the code is also important to make the ball move efficiently and improve the user
experience.
Developing a ball-moving program requires a range of skills and knowledge. It's a great way
for beginners to learn programming concepts while exploring graphics and animation.
Through practice and learning, you can become skilled in game development, computer
graphics, and programming.
Actual Methodology Followed
Topi Work Done Data Work Done By
c
(Develop a program for Darshana Malusare
1. Searching of topic moving ball)
(Rationale, Aim, Applications, Gaurangi Madankar /
2. Gathering Information etc.) Darshana Malusare
Finalization of report Gaurangi Madankar
3. Report Making
Resources Required
Sr. No. Name of Resources Specification Qty. Remark
1. Computer Intel i3, 4GB RAM or 1 -
above
2. MS-Word Office 2007 or above 1 -
3. Reference Book CGR Nirali Publication 1 -
4. Software Turbo C++ - -
Source Code
#include <graphics.h>
#include <conio.h>
#include <dos.h>
int main ()
{
// Initialize graphics mode
int gd = DETECT, gm;
initgraph (&gd, &gm, "C:\\TURBOC3\\BGI");
// Set initial ball position and velocity
int x = 100, y = 100, radius = 20;
int vx = 2, vy = 3;
while (! kbhit ()) // Continue until a key is pressed
{
// Clear previous ball position
setcolor(0);
setfillstyle(SOLID_FILL, 0);
circle(x, y, radius);
floodfill(x, y, 0);
// Move the ball
x += vx;
y += vy;
// Bounce off walls
if (x - radius <= 0 || x + radius >= getmaxx())
vx = -vx;
if (y - radius <= 0 || y + radius >= getmaxy())
vy = -vy;
// Draw the ball at the new position
setcolor(15); // White color
setfillstyle(SOLID_FILL, 15);
circle(x, y, radius);
floodfill(x, y, 15);
// Delay for a short interval
delay(20);
}
closegraph();
getch();
return 0;
}
Output
Skill Developed
1. Able to develop Computer Graphics programs.
2. Able to analyse and fic the errors.
3. Able to debug the program.
Applications
Can be used in college and school level programs.
Subject In-charge
(Mrs. Smita Kuldiwar)