Вы находитесь на странице: 1из 10

CERTIFICATE

This is to certify that the microproject

“Evolution Of Moving Car Program In C”

Is done by

Kajal Devdhe, Aniket Yamgar,

Karan Bharthi and Sahil Shaikh

Is submitted for

“Data Structure Using C”

For

The diploma in Computer Engineering to the

Maharashtra State Board of Technical Education, Mumbai

(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)

Subject Incharge: H.O.D : Principal:

(Mrs. Smita Patil) (Mrs. ManishaPatil ) (Prof.D.R.Suroshe)


Evolution of Moving Car Program in C

Submitted in fulfillment of the requirements

Of micro project of

Computer Graphics

By

Name of student:- Roll no:- Enrollment no:-


Kajal Devdhe 19
Aniket Yamgar 20
Karan Bharti 21
Sajil Shaikh 22

SUBJECT INCHARGE :- MRS. SMITA PATIL

Department of Computer Engineering

Academic Year : - 2019-20


PART A - Plan

Format for micro-project proposal

Evolution of Moving Car Program in C

1.0Introduction

Program in C using graphics to move a car. A car is made using two rectangles and two circles
which act as tires of the car. A for loop is used to move the car forward by changing the
rectangle and circle coordinates and erasing the previous contents on screen using clearviewport,
you can also use cleardevice. Speed of car can be adjusted using delay function, more the delay
lesser will be the speed or lesser the delay your car will move fast. In this program color of the
car also keeps on changing, this is accomplished by incrementing the color value by one each
time in the for loop, you can also use random function for this purpose. Before you see a car
moving you will be asked to press a key.

1.0.Aim of the micro-project

This micro-project aims at


1: To understand the performance of programs using c language.
2: To understand moving car program in c.
3.0 Action plan

S. no Details of activity Planned Planned Name of


start date finish date responsible
student
1 Execution of program 8-8-2019 29-8-2019 KajalDevdhe
2 Information gathering 13-8-2019 29-8-2019 AniketYamgar
3 Analysis 13-8-2019 29-8-2019 Karan Bharthi
4 Implimentation 13-8-2019 29-8-2019 Sahil Shaikh

4.0.Resources required

S.no Name of Specification Qty Remarks


Resource /
Material
1 Computer Processor –i3 1
Ram -2 GB
2 Software Turbo c 1
PART B

Outcomes after execution and

format of micro project report on

Evolution of Moving Car Program in C


1.0 Brief Description

Draw a moving car using computer graphics programming in C:In computer graphics, use
graphics.h which provide direct functions to draw different coordinate shapes (like circle,
rectangle etc). By using these functions we can draw different objects like car, hut, trees etc. In
this program, we will draw a moving car using line and circles.

Functions used in program:


1.0 delay(n): This function is used for holding the program output for a small period of time
since processing is very fast so use it to see the result.
2.0 setcolor(n): A function from graphics.h header file which set the color of the pointer
(cursor). There are some predefined colors in computer graphics. Here n is color number.
3.0 line(x1, y1, x2, y2): A function from graphics.h header file which draw a line with (x1, y1)
as first coordinate of line and (x2, y2) as second coordinate of the line.
4.0 circle(x, y, r): A function from graphics.h header file which draw a circle with center (x, y)
and radius r.
2.0 Aim of micro-project

This micro-project aims at


1: To understand the performance of programs using c language.
2: To understand moving car program in c.

3.0 Course outcomes integrated

 Develop programs using computer graphics in C


 Develop programs for 2-D and 3-D Transformation
4.0.Actual procedure followed

Execution of program KajalDevdhe


Information gathering AniketYamgar
Analysis Karan Bharthi
Implimentation Sahil Shaikh

5.0Actual resources used

S.no Name of Specification Qty Remarks


Resource /
Material
1 Computer Processor –i3 1
Ram -2 GB
2 Software Turbo c 1

6.0.Program for Moving Car

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()
{

int gm,gd=DETECT;

int i= 0;

initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");

while(i<=800)

line(0,300,800,300); // Path

//Body of the car

line(50+i,220,100+i,220);

line(50+i,220,30+i,250);

line(100+i,220,120+i,250);

rectangle(0+i,250,160+i,270);

// Tyres of the car

circle(30+i,285,12);

circle(130+i,285,12);

if(i>=800)

break;

i=i+2;
clearviewport(); // clearing image which would make illusion of moving
car

getch();

closegraph();

Output:
7.0.Skill developed / learing out of this micro-project:

 Manipulate visual and geometric information of images.


 Able to develop programs using C.
 Draw various graphics objects.

8.0.Application of tree traversal:

 Graphics programming in C used to Drawing various geometrical shapes, use of


mathematical functions in drawing lines, triangles with simple animation programs like
moving car
 Develop Graphical related applications like mobile games.

9.0. Conclusion
From this micro-project, We are able to developed programs in computer graphics using C .To
develop various animations like moving car etc.

Вам также может понравиться