CHETANxCGR FINAL - SAMPLE

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION, MUMBAI

A MICRO PROJECT REPORT


ON

“MOVING CYCLE”

CGR MICRO-PROJECT

Submitted by:-
1.Shirsath chaitanya 2215600344
2.patare avdhut 2115600191
3.Mane harshad 2215600339
4.Pathan rihan 2115600172
Under Guidance
Prof.S.S.Tawade
DEPARTMENT OF COMPUTER ENGINEERING
Ashok Institute Of Engineering
&Techonology,Polytechnic,Ashoknagar(2022-2023)
Ashok Gramin Shikshan Sanstha’s
Ashok Institute of Engineering & Technology Polytechnic Ashoknagar
Tal-Shrirampur, Dist-Ahmednagar, Pin Code-413717

CERTIFICATE
This is to certify that the Project work Entitled

“MOVING CYCLE”
SUBMITTED BY

1.Shirsath chaitanya 2215600344


2.patare avdhut 2115600191
3.Mane harshad 2215600339
4.Pathan rihan 2115600172

As partial fulfillment of Diploma course in Computer


Engineering under the Maharashtra State Board of Technical
Education, Mumbai during academic year 2022-2023.
The said work has been assessed by us and we are
satisfied that the same is up to the standard envisaged for the
level of the course, and that the said work may be presented
to the examiner.

Guide Principal HOD

Prof. S.S.Tawade Prof. A. P. Shinde Prof. V. D. Ghogre

Institute code:-1560(DTE CODE:-D5395)


MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI (M.S.)

CERTIFICATE

1.Shirsath chaitanya 2215600344


2.patare avdhut 2115600191
3.Mane harshad 2215600339
4.Pathan rihan 2115600172
Student Of Computer Engineering Was Examined
In
Micro Project Entitled

“MOVING CYCLE”

On / /202
Department of Computer Engineering
ASHOK INSTITUTE OF ENGINEERING & TECHNOLOGY
POLYTECHNIC,ASHOKNAGAR-413717

SHRIRAMPUR (M.S.)2022-2023

ACKNOWLEDGEMENT
It has been a privilege for me to be associated with Prof. S .S. Tawade ,
my guide during this dissertation work. I have been greatly benefited by their
valuable suggestions and ideas. It is with great pleasure that I express my deep
sense of gratitude to her for their guidance, constant encouragement, for their
kindness, moral support and patience throughout this work.

Prof. Ghogare V. D., Head of Department of Computer Engineering, has


been indeed a great source of inspiration for all of us in the campus, so it gives me
an immense pleasure in expressing my indebtedness to his for him kindness and
moral support.

At outset, I take opportunity to express my sincere gratitude to

Prof. A. P. Shinde., Principal for giving me an opportunity to pursue my studies


for the present work.

I am heartily thankful to all staff of Applied Science Engineering


Department from Ashok Polytechnic, Ashoknagar for giving me valuable support.

Finally, I would like to express my deep, incomparable appreciation and


gratitude to my family members for their constant spiritual support and
encouragement to pursue the higher technical education.

Date: / /202

Place: Ashoknagar

Name of Student

1.Shirsath chaitanya 2215600344


2.patare avdhut 2115600191
3.Mane harshad 2215600339
4.Pathan rihan 2115600172
MICRO PROJECT

COMPUTER GRAPHICS

TOPIC:- MOVING CYCLE USING COMPUTER GRAPHICS

SUBMITTED BY : -

1.Shirsath chaitanya 2215600344


2.patare avdhut 2115600191
3.Mane harshad 2215600339
4.Pathan rihan 2115600172

INDEX
SE.NO TOPIC PAGE NO.
1 INTRODUCTION 1

2 HEADER FILES 2

3 FUNCTIONS AND FUNCTION USED 3


4 APPROCH 4
5 FLOWCHART 5
6 CODE 6
7 OUTPUT 7
8 CONCLUSION 8
9 REFERENCE 9

INTRODUCTION
This is our computer graphics project. Our topic is moving cycle. We have
used various Graphics function in this project to execute the output. This project
is simple and Interesting. We have explained various header files and graphics
function used in Program.We have also mentioned the output of the moving
cycle.

In C graphics, the graphics.h functions are used to draw different shapes


like circles, rectangles, etc, display text(any message) in a different
format (different fonts and colors). By using the functions in the
header graphics.h, programs, animations, and different games can also be made.
In this article, let’s discuss how to draw a moving cycle in C using graphics.

1.

HEADER FILES
There are various header files used in program :

➢ #include conio.h

➢ #include iostream.h

➢ #include graphics.h

➢ #include doc.h

1 . conio.h

: - Conio.h is a header files used for function related to console input/output.


:- Conio.h has many inbuilt library function.

:- There are many function declared In conio.h like

1) Getch(); 2 ) Clrscr();

2. iostream.h

:- It is used to perform input and output operation using function like 1) Cout(); 2 )
Cin();

3. #include graphics.h
:- The graphics.h function is used to draw different shapes like circle, rectangle, Etc,
display test(any message) in a different format ( different fonts and Colors) by using the
function in the header files graphics.h, program, Animation and different games can also
be made.

4. #include doc.h
:- Is a header file of c language . thi library has functions that are used for handeling
interrups, produsing sound date and time function etc.

2.

FUNCTIONS AND FUNCTION USED


C
 LINE

 CIRCLE

 RECTANGLE

 DELAY

 CLEARDEVICE

 CLOSEGRAPH

 line(x1, y1, x2, y2): It is a function provided by Graphics.h header file to


draw a line. Here x1, y1 is the first coordinates of the line, and x2, y2 are
the second coordinates of the line respectively.

 circle(x, y, r): It is a function provided by graphics.h  header file to draw a


circle. The x, y are the center points of the circle and r is the radius of the
circle.

 rectangle(X1, Y1, X2, Y2): It is employed in the creation of a rectangle. The


rectangle must be drawn using the coordinates of the left top and right
bottom corners. The X-coordinate and Y-coordinate of the top left
corner are X1 and Y1 and the X-coordinate and Y-coordinate of the bottom
right corner are X2 and Y2 respectively.

 delay(n): It is used to hold the program for a specific time period. Here n is
the number of seconds you want to hold the program.

 cleardevice(): It is used to clear the screen in graphic mode. It sets the


position of the cursor to its initial position, that is, (0, 0) coordinates.

 closegraph(): It is used to close the graph.

3.
APPROCH
 Pass the three arguments to the initgraph() function to initialize the
graphics driver and graphics mode.

 Create the upper body of the cycle by drawing lines.

 Create the wheels of the cycle by drawing circles and choose the
coordinates so that the wheels aligned

 just below the upper body of the cycle

 The next step Is to create the road by drawing lines and stone by drawing
rectangles.

 Choose the coordinates so that the cycle is just above the road

 Change the cycle’s position using a loop continuously so that it appears to


be moving on the

4.
FLOWCHART

5.
CODE FOR MOVING CYCLE

// C++ program to draw the moving


// cycle using computer graphics

#include
#include
#include
#include
// Driver code
Int main()
{
Int gd = DETECT, gm, I, a;
// Path of the program
Initgraph(&gd, &gm, “C:\\TURBOC3\\BGI”program);
// Move the cycle
For (I = 0; I < 600; i++
{
// Upper body of cycle
Line(50 + I, 405, 100 + I, 405);
Line(75 + I, 375, 125 + I, 375);
Line(50 + I, 405, 75 + I, 375);
Line(100 + I, 405, 100 + I, 345);
Line(150 + I, 405, 100 + I, 345);
Line(75 + I, 345, 75 + I, 370);
Line(70 + I, 370, 80 + I, 370);
Line(80 + I, 345, 100 + I, 345);
// Wheel Circle(150 + I, 405, 30);
Circle(50 + I, 405, 30);
// Road
Line(0, 436, getmaxx(), 436);
// Stone
Rectangle(getmaxx() – I, 436, 650 – I, 431);
// Stop the screen for 10 sec
Delay(10);
// Clear the screen
Cleardevice();
}
Getch();
// Close the graph
Closegraph();
}

6.
OUTPUT OF OUR PROGRAM
7.
REFFERENCES
 https://www.javatpoint.com/computer-graphics-rotation

 https://www.geeksforgeeks.org/draw-a-moving-cycleusing-
computer-graphics-programming-in-c-cpp/

9.

CONCLUSION
This program demonstrate a moving cycle using this six graphics function.

 LINE
 CIRCLE
 RECTANGLE
 DELAY
 CLEARDEVICE
 CLOSEGRAPH

8.

You might also like