Saturday, July 11, 2009

RUN 3D CAR

A C++ Program to RUN 3D CAR . It is a graphics oriented program .It is not a simple car running program as usually we see. U will see a Super car with mirrors , bumper ,...a lovely 3D car running on the road.

C++ Program

#include
#include
#include
#include
#include

void main()
{
int
gd=DETECT,gm;
initgraph(&gd,&gm,"c:\tc\bgi");
int c=12;
setbkcolor(0);
//setlinestyle(0,1,2);
int t;
while(1)
{
settextstyle(2,0,5);
outtextxy(100,10,"Press L,H ,T,P");
outtextxy(100,30,"Press 1 for Quit");
as:
setcolor(13);
ellipse(380,127,20,152,130,35);
//////////////////////////////rear//////////////////////////

line(490,109,560,142);
line(560,142,569,142);
line(569,142,582,102);
line(582,102,620,92);
line(593,132,617,125);

line(617,124,627,96);
line(620,92,628,97);

line(472,86,602,96);
line(501,113,575,121);
line(443,77,475,80);

line(443,77,432,93);
line(475,80,472,85);
//setcolor(4);
line(593,132,593,137);
line(593,137,600,141);
line(600,141,600,185);
line(600,185,608,192);
line(608,192,608,234);
line(608,234,586,253);
line(586,253,577,248);

///////////////////////// mirror
line(263,112,363,127);
line(193,160,263,112);
line(193,160,220,170);
line(220,170,280,180);
line(280,180,320,185);
line(320,185,363,127);
////////////////////////////////sidemirror
line(340,194,460,169);
line(460,169,519,152);

ellipse(512,144,300,30,10,10);
ellipse(467,143,28,100,50,30);
line(510,128,521,138);
line(435,116,440,171);

// setcolor(4);
////////////////////////////////////////cont//
line(339,194,372,144);
// line(372,140,386,128);
ellipse(454,208,87,123,128,95);
line(372,144,384,128);
int b,x,y;
////////////////////////lower
line(365,298,524,264);
line(365,298,330,310);
line(330,310,323,310);


///////////////////////////////bumper
ellipse(162,221,135,190,90,40);
line(96,193,140,174);
line(140,174,160,168);
line(160,168,192,161);

//////////////////////front
ellipse(75,246,95,190,18,18);
line(57,251,57,286);
//setcolor(4);
ellipse(181,178,232,263,200,137);
ellipse(195,180,256,286,200,137);

ellipse(191,171,228,247,200,100);
ellipse(231,198,234,275,200,80);
It is a long Program. So Download it from given below link. Enjoy running 3D CAR on screen.

DOWNLOAD LINK -
http://www.megaupload.com/?d=3WOW2C9T

Thank u for visiting KITE Groups.

1 comment:

ritesh said...

if you can show your creation it would be better for us to understand