CHETANxCGR FINAL - SAMPLE
CHETANxCGR FINAL - SAMPLE
CHETANxCGR FINAL - SAMPLE
EDUCATION, MUMBAI
“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
CERTIFICATE
“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.
Date: / /202
Place: Ashoknagar
Name of Student
COMPUTER GRAPHICS
SUBMITTED BY : -
INDEX
SE.NO TOPIC PAGE NO.
1 INTRODUCTION 1
2 HEADER FILES 2
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.
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
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.
CIRCLE
RECTANGLE
DELAY
CLEARDEVICE
CLOSEGRAPH
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.
3.
APPROCH
Pass the three arguments to the initgraph() function to initialize the
graphics driver and graphics mode.
Create the wheels of the cycle by drawing circles and choose the
coordinates so that the wheels aligned
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
4.
FLOWCHART
5.
CODE FOR MOVING CYCLE
#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.