Wednesday, 4 September 2013

Animated 3D car

Animated 3D car


Code

#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<process.h>

void main()
{
   int gd=DETECT,gm;
   initgraph(&gd,&gm,"C:\\Turboc3\\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);

//setcolor(9);
//ellipse(195,170,256,286,200,137);
//setcolor(12);

ellipse(196,167,228,246,200,90);
ellipse(231,184,234,276,200,80);


ellipse(191,200,228,246,200,90);
ellipse(228,218,234,276,200,80);

ellipse(258,268,180,220,200,40);
ellipse(178,296,244,355,16,10);

ellipse(238,249,227,250,200,60);


/////////////wheel1
ellipse(302,281,320,77,26,45);
ellipse(290,277,65,162,40,45);
ellipse(278,288,144,212,31,45);

/////////////wheel2
//setcolor(5);
ellipse(302+260,229,328,87,26,45);
ellipse(290+280-7,277-50+2,90,162,40,45);
ellipse(278+270,288-50,144,215,27,45);
 b=0;
int v=0;

/////////
ellipse(302+250+v,227+b,295,90,29,41);
ellipse(302+234+v,231+b,245,306,50,40);
//setlinestyle(3,0,3);
ellipse(302+248+v,229+b,0,360,21,30);

ellipse(302+247+v,229+b,0,360,8,10);
setfillstyle(6,11);
//floodfill(302+248+v,230+b,13);
//line(546,201,546,257);
//line(554,201,554,257);
//setcolor(4);

line(546+v,201+b,546+v,220+b);
line(551+v,201+b-2,551+v,220+b);

line(546+v,238+b,546+v,257+b);
line(551+v,238+b+2,551+v,257+b+2);


line(530+v,225+b,541+v,225+b);
line(530+v,230+b,541+v,230);

line(557+v,225+b,570+v,225+b);
line(557+v,230+b,570+v,230+b);



line(563+v,206+b,552+v,222+b);
line(534+v,246+b,543+v,232+b);

line(566+v,210+b,556+v,223+b);
line(536+v,250+b,544+v,238+b);

line(536+v,207+b,546+v,222+b);
line(532+v,213+b,542+v,224+b);

line(556+v,235+b,566+v,247+b);
line(551+v,237+b,563+v,253+b);



////////////////////////////////////////////////////
v=-260;
b=56;
ellipse(302+233+v,221+b,260,60,49,51);
//ellipse(302+234+v,231+b,245,306,50,40);
//setlinestyle(3,0,3);
ellipse(302+243+v,224+b,0,360,28,35);
//  line(249,328,269,328);
ellipse(300+245+v,223+b,0,360,10,12);

ellipse(285+249+v,239+b,210,260,30,33);
//floodfill(285+258+v,230+b,12);
b=45;
v=v-4;
line(546+v,201+b,546+v,220+b+2);
line(551+v,201+b,551+v,220+b+2);
b=b+8;
line(546+v,238+b,546+v,257+b+4);
line(551+v,238+b,551+v,257+b+4);
v=v-2;
line(530+v-6,225+b,541+v,225+b);
line(530+v-6,230+b,541+v,230+b);
v=v+5;
line(557+v,225+b,570+v+3,225+b);
line(557+v-1,230+b,570+v+3,230+b);


b=b-5;
v=v-5;
line(565+v+3,206+b,552+v+4,222+b-2);
b=b+15;

line(534+v,246+b,543+v+3,232+b-5);
b=b-10;
line(566+v+7,210+b-5,556+v+4,220+b);
line(536+v-5,250+b,544+v-2,238+b-4);


line(536+v,207+b-8,545+v,222+b-5);
line(531+v,212+b-8,542+v,224+b-2);

line(556+v,235+b,566+v+3,247+b+5);
line(551+v,237+b,563+v+2,253+b+3);

///////////////////lights
ellipse(199,250,144,345,18,8);
line(185,245,206,230);
//setcolor(4);
ellipse(223,234,340,110,8,5);
line(230,237,217,252);
line(206,230,220,229);
//setfillstyle(1,4);

//floodfill(200,240,12);

/////////////////////////////////////
line(90,223,152,236);
line(152,236,137,254);
line(90,223,90,242);

//setfillstyle(10,9);
//floodfill(91,230,14);
ellipse(240,270,104,136,100,60);
ellipse(185,237,120,160,100,60);
ellipse(80,221,357,134,10,10);

line(152,236,168,228);
///////////////////////////////////////////////
line(435,116,440,171);
//////////////////////////////////////////hp
//line(134,185,220,210);
line(134,185,196,160);
line(214,212,318,185);
/////////////////////////////////////////////////light

//setcolor(14);
ellipse(166,247,99,330,8,8);
ellipse(171,243,310,129,7,7);
putpixel(174,250,13);
putpixel(173,251,13);
putpixel(164,239,13);
putpixel(165,238,13);

/////////////////////////////////////////road/////////////////////
setcolor(13);
line(1,430,639,300);
line(1,445,639,315);

line(1,210,93,194);
line(1,195,194,158);

//line(1,170,639,71);
//line(1,170,229,135);
line(520,90,639,71);
line(478,86,639,56);

   int c=0;

   line(10,194+c,10,208+c);
line(40,189+c,40,204+c);
line(70,183+c,70,198+c);
line(100,176+c,100,190+c);
line(130,170+c,130,177+c);
line(160,166+c,160,168+c);
line(190,160+c,190,161+c);

 line(190+330,78+c,190+330,89+c);

line(190+360,72+c,190+360,85+c);
line(190+390,67+c,190+390,81+c);
line(190+420,62+c,190+420,76+c);
line(190+449,57+c,190+449,71+c);



   c=236;

line(10,192+c,10,208+c);
line(40,189+c-2,40,204+c-3);
line(70,183+c-3,70,198+c-3);
line(100,176+c-2,100,190+c-2);
line(130,170+c-2,130,177+c+5);
line(160,166+c-3,160,168+c+8);
line(190,160+c-4,190,161+c+9);

line(190+30,156+c-5,190+30,170+c-5);


line(190+30+30,156+c-12,190+30+30,170+c-12);

line(190+90,156+c-18,190+90,170+c-17);

line(190+120,156+c-25,190+120,170+c-25);

line(190+150,156+c-30,190+150,170+c-30);

line(190+180,156+c-37,190+180,170+c-36);


line(190+210,156+c-42,190+210,170+c-42);


line(190+240,156+c-48,190+240,170+c-48);


line(190+270,156+c-55,190+270,170+c-54);


line(190+300,156+c-61,190+300,170+c-61);



 line(190+330,78+c+10,190+330,89+c+13);

line(190+360,72+c+11,190+360,85+c+13);
line(190+390,67+c+10,190+390,81+c+10);
line(190+420,62+c+8,190+420,76+c+10);
line(190+449,57+c+8,190+449,71+c+8);




/////////////////road

setcolor(12);          /////////////////////////////1

line(1,310,25,306);
line(6,318,30,315);
line(1,310,6,318);
line(25,306,30,314);
int k,m;
k=13*45+19;
m=16*(-8);
   //2
setcolor(12);

line(605,310-128,629,306-128);
line(610,318-128,634,315-128);
line(605,310-128,610,318-128);
line(629,306-128,634,314-128);

setcolor(12);    //////////////////////////////////3
k=45;
m=-8;
line(46,302,70,298);
line(51,310,75,307);
line(46,302,51,310);
line(70,298,75,306);


setfillstyle(1,0);
floodfill(64,303,12);

setfillstyle(1,14);
floodfill(14,314,12);
floodfill(617,183,12);

setfillstyle(1,0);
floodfill(14,314,12);
floodfill(617,183,12);

setfillstyle(1,14);
floodfill(64,303,12);

t=getch();
if(t=='1')
exit(0);
if(t=='h')
{
sound(710);
delay(500);
nosound();
//break;
}
if(t=='t')
{
while(!kbhit())  {
setfillstyle(1,0);
floodfill(536,213,13);
floodfill(563,213,13);
floodfill(561,244,13);
floodfill(538,244,13);
floodfill(274,295,13);
floodfill(294,295,13);
floodfill(274,265,13);
floodfill(294,265,13);
floodfill(548,250,13);
floodfill(548,214,13);
floodfill(533,228,13);
floodfill(563,228,13);
floodfill(262,281,13);
floodfill(308,281,13);
floodfill(284,251,13);
floodfill(284,295,13);

setfillstyle(1,random(12));

floodfill(200,250,13);
delay(10);
//setfillstyle(1,11);

 floodfill(170,250,13);
 floodfill(80,230,13);


 }

setfillstyle(1,0);

floodfill(200,250,13);
delay(10);
//setfillstyle(1,11);

 floodfill(170,250,13);
 floodfill(80,230,13);

}


if(t=='l')
{
while(!kbhit())
{

delay(120);
setfillstyle(6,0);         //////////////////////////ty
floodfill(536,213,13);
floodfill(563,213,13);
floodfill(561,244,13);
floodfill(538,244,13);
floodfill(274,295,13);
floodfill(294,295,13);
floodfill(274,265,13);
floodfill(294,265,13);

setfillstyle(1,0);
floodfill(64,303,12);

///////////////////////////////////road

setfillstyle(9,0);       /////////////////////color
floodfill(81-40+5,419+7,13);
floodfill(151-40,409+7,13);
floodfill(211-40,397+7,13);
floodfill(271-40,380+7,13);
floodfill(331-40,368+7,13);
floodfill(396-40,355+7,13);
floodfill(450-40,345+7,13);
floodfill(510-40,335+7,13);
floodfill(570-40,325+7,13);
floodfill(630-40,312+7,13);


//////////////////////
floodfill(50,197,13);
floodfill(110,177,13);
floodfill(166,165,13);
floodfill(527,86,13);
floodfill(587,71,13);




setfillstyle(6,14); //////////////////////////ty
floodfill(548,250,13);
floodfill(548,214,13);
floodfill(533,228,13);
floodfill(563,228,13);
floodfill(262,281,13);
floodfill(308,281,13);
floodfill(284,251,13);
floodfill(284,295,13);
////////////////////////////////////////road

setfillstyle(9,10);///////////////////////////////////color
floodfill(19,429,13);
floodfill(81,419,13);
floodfill(151,409,13);
floodfill(211,397,13);
floodfill(271,380,13);
floodfill(331,368,13);
floodfill(396,355,13);
floodfill(450,345,13);
floodfill(510,335,13);
floodfill(570,325,13);
floodfill(630,312,13);
//////////////////////////////////////
floodfill(20,197,13);
floodfill(80,187,13);
floodfill(133,174,13);
floodfill(517,86,13);
floodfill(557,81,13);
floodfill(627,70,13);

setfillstyle(1,14);
floodfill(14,314,12);
floodfill(617,183,12);

///////////////////////////////////////
setfillstyle(10,4);
floodfill(302+248,230,13);
floodfill(302+248+v,230+b,13);
///light
setfillstyle(6,11);                             ///////////

floodfill(200,250,13);

floodfill(170,250,13);
 floodfill(80,230,13);

delay(120);

setfillstyle(6,0);/////////////////////ty
floodfill(548,250,13);
floodfill(548,214,13);
floodfill(533,228,13);
floodfill(563,228,13);
floodfill(262,281,13);
floodfill(308,281,13);
floodfill(284,251,13);
floodfill(284,295,13);
/////////////////////////////////////road
setfillstyle(9,0);      ///////////////color

floodfill(19,429,13);
floodfill(81,419,13);
floodfill(151,409,13);
floodfill(211,397,13);
floodfill(271,380,13);
floodfill(331,368,13);
floodfill(396,355,13);
floodfill(450,345,13);
floodfill(510,335,13);
floodfill(570,325,13);
floodfill(630,312,13);
///////////////////////////////////////////////////////
floodfill(20,197,13);
floodfill(80,187,13);
floodfill(133,174,13);
floodfill(517,86,13);
floodfill(557,81,13);
floodfill(627,70,13);
/////////////////////////////
setfillstyle(1,0);
floodfill(14,314,12);
floodfill(617,183,12);

setfillstyle(6,10);            /////////////ty

floodfill(536,213,13);
floodfill(563,213,13);
floodfill(561,244,13);
floodfill(538,244,13);
floodfill(274,295,13);
floodfill(294,295,13);
floodfill(274,265,13);
floodfill(294,265,13);
////////////////////////////////////////////////road
setfillstyle(9,14);/////////////////////////////////////////color
floodfill(81-40+5,419+7,13);
floodfill(151-40,409+7,13);
floodfill(211-40,397+7,13);
floodfill(271-40,380+7,13);
floodfill(331-40,368+7,13);
floodfill(396-40,355+7,13);
floodfill(450-40,345+7,13);
floodfill(510-40,335+7,13);
floodfill(570-40,325+7,13);
floodfill(630-40,312+7,13);
/////////////////////////////////////////

floodfill(50,197,13);
floodfill(110,177,13);
floodfill(166,165,13);
floodfill(527,86,13);
floodfill(587,71,13);
setfillstyle(1,14);
floodfill(64,303,12);

setfillstyle(9,4);
floodfill(302+248,230,13);
floodfill(302+248+v,230+b,13);

delay(20);
setfillstyle(1,14);

floodfill(200,250,13);

floodfill(170,250,13);
 floodfill(80,230,13);

 delay(20);
setfillstyle(1,0);

floodfill(200,250,13);

floodfill(170,250,13);
 floodfill(80,230,13);




}          }




if(t=='p')
{
int n=0;
while(!kbhit())
{
if(n<=60)
n++;
setcolor(0);
rectangle(1+1,-10,90-1,-12+n);
delay(14);

setcolor(9);
rectangle(1,-10,90,-10+n);
if(n==60)
{

outtextxy(10,10,"L-LIGHTS");
outtextxy(10,20,"H-HORN");
//outtextxy(10,30,"T-AllOY");
 delay(400);
 }


}
setcolor(0);
rectangle(1,-10,90,-10+n);
rectangle(1,-10,90,-11+n);
outtextxy(10,10,"L-LIGHTS");
outtextxy(10,20,"H-HORN");
//outtextxy(10,30,"T-AllOY");

}

}



circle(300,100,3);

nosound();

getch();
}

Happy Coding

TAJMAHAL- in Turbo C++ 3.0 Graphics


TAJMAHAL- in Turbo C++ 3.0 Graphics



Code:

#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<process.h>

main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\Turboc3\\BGI");
int h=40;
line(0,440,639,440);

//line(20,30+h,619,30+h);

//line(25,400,38,120);
//line(85,400,78,120);
//line(85,400,78,120);


//=================================Ist tower========================//
//=================================IIsttower============================//
//#################TOWER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
int l=-20;
line(28+l,400+h,33+l,333+h);
line(86+l,400+h,80+l,333+h);
//||||||||||||||||||||||||||||||Iststage||||||||||||||||||||||||||||||||||||||||||||//
line(23+l,328+h,32+l,334+h);               // slant
line(88+l,328+h,80+l,334+h);                       // slant
line(83+l,323+h,75+l,334+h);                       // slant
line(75+l,323+h,70+l,332+h);
line(66+l,323+h,65+l,332+h);                       // slant
line(57+l,323+h,57+l,332+h);                       // slant
line(30+l,323+h,39+l,334+h);                       // slant
line(38+l,323+h,45+l,332+h);
line(48+l,323+h,51+l,332+h);      // slant

ellipse(57+l,320+h,350,190,34,5);
ellipse(57+l,327+h,350,190,34,5);
ellipse(57+l,337+h,0,180,25,5);
line(22+l,320+h,22+l,328+h);
line(91+l,320+h,91+l,327+h);
setfillstyle(6,15);
floodfill(60+l,320+h,15);

setfillstyle(10,15);

floodfill(60+l,320+h+15,15);


//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]||//
//+++++++++++++++++++++++++++++++++++2nd+++++++++++++++++++++++++++

line(35+l,315+h,38+l,242+h);
line(80+l,315+h,75+l,242+h);

//||||||||||||||||||||||||||||||2ststage||||||||||||||||||||||||||||||||||||||||||||//
int t=-93;
line(23+4+l,328+t+3+h,32+5+l,334+t+h);               // slant
line(88+l,328+t+2+h,76+l,334+t+h);                       // slant
//line(+l83,323+t+4,75,334+t);                       // slant
line(78+l,323+t+3+h,71+l,332+t+h);
line(66+l,323+t+2+h,65+l,332+t+h);                       // slant
line(57+l,323+t+2+h,57+l,332+t-2+h);                       // slant
//line(30,323+t+2,39,334+t);                       // slant
line(35+l,323+t+3+h,45-3+l,332+t+h);
line(48+l,323+t+2+h,51+l,332+t-2+h);      // slant

ellipse(57+l,320+t+3+h,360,190,30,5);
ellipse(57+l,327+t+3+h,360,190,30,5);
ellipse(57+l,337+t-1+h,0,180,18,5);

line(26+l,320+t+3+h,26+l,328+t+2+h);
line(88+l,320+t+3+h,88+l,327+t+3+h);
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
setfillstyle(6,15);
floodfill(60+l,320+h+t,15);                            ////////////////
setfillstyle(10,15);
floodfill(60+l,320+h-35,15);

//||||||||||||||||||||||||||||||3rdstage||||||||||||||||||||||||||||||||||||||||||||//

line(38+l,225+h,41+l,152+h);
line(75+l,225+h,72+l,152+h);



 t=-182;
line(32+l,328+t+4+h,32+7+l,334+t+h);               // slant
line(80+l,328+t+4+h,73+l,334+t+h);                       // slant
//line(+l83,323+t+4,75,334+t);                       // slant
line(76+l,323+t+5+h,71+l,332+t+h);
line(66+l,323+t+4+h,65+l,332+t+h);                       // slant
line(57+l,323+t+4+h,57+l,332+t-2+h);                       // slant
//line(30,323+t+2,39,334+t);                       // slant
line(39+l,323+t+6+h,45+l,332+t+1+h);
line(48+l,323+t+4+h,51+l,332+t+h);      // slant

ellipse(57+l,320+t+6+h,360,190,24,5);
ellipse(57+l,327+t+4+h,360,190,24,5);
ellipse(57+l,337+t-1+h,0,170,16,5);

line(32+l,320+t+6+h,32+l,328+t+3+h);
line(81+l,320+t+6+h,81+l,327+t+3+h);

setfillstyle(6,15);
floodfill(60+l,322+h+t,15);
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
setfillstyle(10,15);
floodfill(60+l,322+h+t+30,15);
//GGF################TOWER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//

ellipse(51+l,132+h,340,216,4,15);
ellipse(62+l,131+h,327,216,4,15);
ellipse(72+l,132+h,327,216,2,15);
ellipse(42+l,132+h,327,216,2,15);
ellipse(57+l,107+h,0,170,16,5);
line(40+l,107+h,40+l,140+h);
line(75+l,107+h,75+l,140+h);

line(34+l,107+h,40+l,107+h);
line(75+l,107+h,81+l,107+h);

line(34+l,107+h,28+l,102+h);                      //slant
line(81+l,107+h,87+l,102+h);

line(28+l,102+h,34+l,98+h);
line(87+l,102+h,81+l,98+h);

line(34+l,98+h,58+l,95+h);
line(58+l,95+h,81+l,98+h);


ellipse(65+l,92+h,104,190,30,30);

ellipse(50+l,92+h,350,76,30,30);

line(58+l,61+h,58+l,63+h);
circle(58+l,58+h,3);
line(58+l,55+h,58+l,53+h);
circle(58+l,50+h,2);
line(58+l,48+h,58+l,47+h);
circle(58+l,45+h,1);
line(58+l,44+h,58+l,41+h);
setfillstyle(6,15);
floodfill(60+l-2,322+h+t-60,15);

setfillstyle(10,15);
floodfill(60+l-2,322+h+t-30,15);


//=================================IIsttower============================//
//#################TOWER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
 l=547;


line(28+l,400+h,33+l,333+h);
line(86+l,400+h,80+l,333+h);
//||||||||||||||||||||||||||||||Iststage||||||||||||||||||||||||||||||||||||||||||||//
line(23+l,328+h,32+l,334+h);               // slant
line(88+l,328+h,80+l,334+h);                       // slant
line(83+l,323+h,75+l,334+h);                       // slant
line(75+l,323+h,70+l,332+h);
line(66+l,323+h,65+l,332+h);                       // slant
line(57+l,323+h,57+l,332+h);                       // slant
line(30+l,323+h,39+l,334+h);                       // slant
line(38+l,323+h,45+l,332+h);
line(48+l,323+h,51+l,332+h);      // slant

ellipse(57+l,320+h,350,190,34,5);
ellipse(57+l,327+h,350,190,34,5);
ellipse(57+l,337+h,0,180,25,5);
line(22+l,320+h,22+l,328+h);
line(91+l,320+h,91+l,327+h);
setfillstyle(6,15);
floodfill(60+l,320+h,15);

setfillstyle(10,15);

floodfill(60+l,320+h+15,15);


//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
//+++++++++++++++++++++++++++++++++++2nd+++++++++++++++++++++++++++

line(35+l,315+h,38+l,242+h);
line(80+l,315+h,75+l,242+h);

//||||||||||||||||||||||||||||||2ststage||||||||||||||||||||||||||||||||||||||||||||//
t=-93;
line(23+4+l,328+t+3+h,32+5+l,334+t+h);               // slant
line(88+l,328+t+2+h,76+l,334+t+h);                       // slant
//line(+l83,323+t+4,75,334+t);                       // slant
line(78+l,323+t+3+h,71+l,332+t+h);
line(66+l,323+t+2+h,65+l,332+t+h);                       // slant
line(57+l,323+t+2+h,57+l,332+t-2+h);                       // slant
//line(30,323+t+2,39,334+t);                       // slant
line(35+l,323+t+3+h,45-3+l,332+t+h);
line(48+l,323+t+2+h,51+l,332+t-2+h);      // slant

ellipse(57+l,320+t+3+h,360,190,30,5);
ellipse(57+l,327+t+3+h,360,190,30,5);
ellipse(57+l,337+t-1+h,0,180,18,5);

line(26+l,320+t+3+h,26+l,328+t+2+h);
line(88+l,320+t+3+h,88+l,327+t+3+h);
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
setfillstyle(6,15);
floodfill(60+l,320+h+t,15);                            ////////////////
setfillstyle(10,15);
floodfill(60+l,320+h-35,15);

//||||||||||||||||||||||||||||||3rdstage||||||||||||||||||||||||||||||||||||||||||||//

line(38+l,225+h,41+l,152+h);
line(75+l,225+h,72+l,152+h);



 t=-182;
line(32+l,328+t+4+h,32+7+l,334+t+h);               // slant
line(80+l,328+t+4+h,73+l,334+t+h);                       // slant
//line(+l83,323+t+4,75,334+t);                       // slant
line(76+l,323+t+5+h,71+l,332+t+h);
line(66+l,323+t+4+h,65+l,332+t+h);                       // slant
line(57+l,323+t+4+h,57+l,332+t-2+h);                       // slant
//line(30,323+t+2,39,334+t);                       // slant
line(39+l,323+t+6+h,45+l,332+t+1+h);
line(48+l,323+t+4+h,51+l,332+t+h);      // slant

ellipse(57+l,320+t+6+h,360,190,24,5);
ellipse(57+l,327+t+4+h,360,190,24,5);
ellipse(57+l,337+t-1+h,0,170,16,5);

line(32+l,320+t+6+h,32+l,328+t+3+h);
line(81+l,320+t+6+h,81+l,327+t+3+h);

setfillstyle(6,15);
floodfill(60+l,322+h+t,15);
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
setfillstyle(10,15);
floodfill(60+l,322+h+t+30,15);
//GGF################TOWER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//

ellipse(51+l,132+h,340,216,4,15);
ellipse(62+l,131+h,327,216,4,15);
ellipse(72+l,132+h,327,216,2,15);
ellipse(42+l,132+h,327,216,2,15);
ellipse(57+l,107+h,0,170,16,5);
line(40+l,107+h,40+l,140+h);
line(75+l,107+h,75+l,140+h);

line(34+l,107+h,40+l,107+h);
line(75+l,107+h,81+l,107+h);

line(34+l,107+h,28+l,102+h);                      //slant
line(81+l,107+h,87+l,102+h);

line(28+l,102+h,34+l,98+h);
line(87+l,102+h,81+l,98+h);

line(34+l,98+h,58+l,95+h);
line(58+l,95+h,81+l,98+h);


ellipse(65+l,92+h,104,190,30,30);

ellipse(50+l,92+h,350,76,30,30);

line(58+l,61+h,58+l,63+h);
circle(58+l,58+h,3);
line(58+l,55+h,58+l,53+h);
circle(58+l,50+h,2);
line(58+l,48+h,58+l,47+h);
circle(58+l,45+h,1);
line(58+l,44+h,58+l,41+h);
setfillstyle(6,15);
floodfill(60+l-2,322+h+t-60,15);

setfillstyle(10,15);
floodfill(60+l-2,322+h+t-30,15);
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//

//GGF################TOWER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//

ellipse(51+l,132+h,340,216,4,15);
ellipse(62+l,131+h,327,216,4,15);
ellipse(72+l,132+h,327,216,2,15);
ellipse(42+l,132+h,327,216,2,15);
ellipse(57+l,107+h,0,170,16,5);
line(40+l,107+h,40+l,140+h);
line(75+l,107+h,75+l,140+h);

line(34+l,107+h,40+l,107+h);
line(75+l,107+h,81+l,107+h);

line(34+l,107+h,28+l,102+h);                      //slant
line(81+l,107+h,87+l,102+h);

line(28+l,102+h,34+l,98+h);
line(87+l,102+h,81+l,98+h);

line(34+l,98+h,58+l,95+h);
line(58+l,95+h,81+l,98+h);


ellipse(65+l,92+h,104,190,30,30);

ellipse(50+l,92+h,350,76,30,30);

line(58+l,61+h,58+l,63+h);
circle(58+l,58+h,3);
line(58+l,55+h,58+l,53+h);
circle(58+l,50+h,2);
line(58+l,48+h,58+l,47+h);
circle(58+l,45+h,1);
line(58+l,44+h,58+l,41+h);


//=================================Ist tower========================//

//+++++++++++++++++++++++++++++++++TAJ mahal++++++++++++++++++++++++//

////setcolor(15);

rectangle(275,290,365,440);         //  inner
rectangle(268,283,372,440);           //     //inner
setfillstyle(1,15);
floodfill(274,294,15);
line(280,440,280,350);
//line(283,440,283,350);
ellipse(315,349,130,180,35,40);
ellipse(275,280,290,326,53,40);

line(360,440,360,350);
ellipse(325,349,360,50,35,40);
ellipse(361,280,216,255,53,40);
setfillstyle(9,7);
floodfill(277,386,15);
putpixel(277,386,14);

line(280,360,359,360);
line(280,364,359,364);
setfillstyle(1,15);
floodfill(281,362,15);

rectangle(295+4,370,345-4,440);
rectangle(292+4,367,348-4,440);
setfillstyle(1,15);
floodfill(294+4,369,15);
rectangle(296,378,344,380);
floodfill(301,379,15);


line(302,405,302,440);
line(338,405,338,440);
ellipse(327,405,108,180,25,20);

ellipse(313,405,360,74,25,20);

setfillstyle(7,15);
//putpixel(312,416,11);
//floodfill(312,406,15);
line(329,390,329,440);
line(310,391,310,440);
line(311,402,329,402);
line(311,422,329,422);
line(302,412,310,412);
line(329,412,338,412);

line(302,428,310,428);
line(329,428,338,428);
//setfillstyle(7,15);


 int p=-60;
line(302,405+p,302,440+p-20);
line(338,405+p,338,440+p-20);
ellipse(327,405+p,108,180,25,20);

ellipse(313,405+p,360,74,25,20);
setfillstyle(7,15);
floodfill(311,406,15);
line(329,390+p,329,440+p-20);
line(310,391+p,310,440+p-20);
line(311,402+p,329,402+p);
line(311,422+p-7,329,422+p-7);
line(302,412+p,310,412+p);
line(329,412+p,338,412+p);



//??//////////////////////////////////2nd portion/////////////////////


rectangle(245,260,400,440);         //  inner
rectangle(230,245,415,440);           //     //inner

rectangle(230,425,275,440);
setfillstyle(1,15);
floodfill(231,426,15);
floodfill(249,426,15);
////setcolor(8);
rectangle(230+135,425,275+140,440);
//setfillstyle(1,15);

floodfill(231+160,426,15);
floodfill(249+159,426,15);



////setcolor(15);
line(415,290,415,440);
line(420,245,420,440);

line(415,240,415,205);
line(420,240,420,205);


line(225,245,225,440);          //vertical
line(230,250,230,440);

line(225,240,225,205);          //vertical
line(230,240,230,205);

line(222,240,425,240);
line(222,245,425,245);                    //horz

ellipse(222,242.5,90,270,2.5,2.5);
ellipse(425,242.5,270,90,2.5,2.5);

rectangle(231,230,414,239);



ellipse(227,206,0,180,9,1);
ellipse(227,204,0,180,9,1);
putpixel(220,204,15);
putpixel(220,205,15);
putpixel(220,206,15);
putpixel(235,204,15);
putpixel(235,205,15);
putpixel(235,206,15);
ellipse(227,203,0,180,6,7);
line(227,195,227,192);
int r=190;

ellipse(227+r,206,0,180,9,1);
ellipse(227+r,204,0,180,9,1);
putpixel(220+r,204,15);
putpixel(220+r,205,15);
putpixel(220+r,206,15);
putpixel(235+r,204,15);
putpixel(235+r,205,15);
putpixel(235+r,206,15);

ellipse(227+r,203,0,180,6,7);
line(227+r,195,227+r,192);

/*

//floodfill(305,424,15);
//floodfill(305,429,15);
//floodfill(325,424,15);
//floodfill(325,421,15);
//floodfill(332,420,15);
//floodfill(332,429,15);
*/

ellipse(315,170,140,210,105,100);
ellipse(330,170,330,40,105,100);

ellipse(292,167,105,140,75,95);
ellipse(353,167,40,75,75,95);

ellipse(323,78,350,190,60,8);
ellipse(323,77,350,190,60,8);


//ellipse(259,24,295,358,58,51);
ellipse(240,24,321,358,78,71);
ellipse(192,40,342,7,128,100);

ellipse(448,30,180,203,128,100);
ellipse(443,5,194,220,128,100);
ellipse(438,-9,203,234,128,100);
ellipse(198,-6,310,340,128,100);

ellipse(319,30,0,360,7,2);

floodfill(320,29,15);
circle(319,24,3);
line(319,20,319,18);
circle(319,14,4);
line(319,9,319,0);
//ellipse(319,4,0,360,2,3);
circle(319,2,1);
line(316,6,322,6);
line(316,6,314,4);
line(322,6,324,4);
//???????????????????????????????????

//////////////////////////////////////////////////////////
//ellipse();
ellipse(321,258,48,130,140,50);
ellipse(321,255,48,130,140,50);

ellipse(321,241,48,130,140,50);
ellipse(321,238,48,130,140,50);
//setfillstyle(6,11);
//  line(265,79,277,70);
//////setcolor(4);
  //line(385,81,380,76);

//while(!kbhit())
//{
 delay(300);
setfillstyle(10,15);

floodfill(322,160,15);
setfillstyle(6,15);

floodfill(322,193,15);

//}
//line(319,26,319,480+h);//center



///////////////////////////////////////////new////////////////////////////
rectangle(150,283,225,294);

//line(146,294,225,294);
line(150,298,225,298);

line(150,240,150,440);            //pole
line(146,240,146,440);

line(150,299,150,440);            //pole
line(146,299,146,440);


r=-80;
int n=34;

ellipse(227+r,206+n,0,180,9,1);
ellipse(227+r,204+n,0,180,9,1);
putpixel(220+r,204+n,15);
putpixel(220+r,205+n,15);
putpixel(220+r,206+n,15);
putpixel(235+r,204+n,15);
putpixel(235+r,205+n,15);
putpixel(235+r,206+n,15);

ellipse(227+r,203+n,0,180,6,7);
line(227+r,195+n,227+r,192+n);

l=128;
h=150;

ellipse(51+l,132+h-7,340,216,4,15);
ellipse(62+l,131+h-7,327,216,4,15);
ellipse(72+l,132+h-7,327,216,2,15);
ellipse(42+l,132+h-7,327,216,2,15);
ellipse(57+l,107+h,0,170,16,5);
line(40+l,107+h,40+l,140+h-7);
line(75+l,107+h,75+l,140+h-7);

line(34+l,107+h,40+l,107+h);
line(75+l,107+h,81+l,107+h);

line(34+l,107+h,28+l,102+h);                      //slant
line(81+l,107+h,87+l,102+h);

line(28+l,102+h,34+l,98+h);
line(87+l,102+h,81+l,98+h);

line(34+l,98+h,58+l,95+h);
line(58+l,95+h,81+l,98+h);


ellipse(65+l,92+h,104,190,30,30);

ellipse(50+l,92+h,350,76,30,30);

line(58+l,61+h,58+l,63+h);
circle(58+l,58+h,3);
line(58+l,55+h,58+l,53+h);
circle(58+l,50+h,2);
line(58+l,48+h,58+l,47+h);
circle(58+l,45+h,1);
line(58+l,44+h,58+l,41+h);


line(100-5,240+15,100-5,440);            //pole
line(96-5,240+15,96-5,440);

r=-134;
 n=49;
ellipse(227+r,206+n,0,180,9,1);
ellipse(227+r,204+n,0,180,9,1);
putpixel(220+r,204+n,15);
putpixel(220+r,205+n,15);
putpixel(220+r,206+n,15);
putpixel(235+r,204+n,15);
putpixel(235+r,205+n,15);
putpixel(235+r,206+n,15);

ellipse(227+r,203+n,0,180,6,7);
line(227+r,195+n,227+r,192+n);


line(146,294,97,302);
line(146,298,97,306);

line(146,283,97,291);


///////////////////////////////////////inner/////////////////

//rectangle(275+k,290,365+k,440);         //  inner
//rectangle(268+k,283,372+k,440);           //     //inner

//line(225,367,151,367);
rectangle(155,302,220,364);
rectangle(155,302+70,220,364+75);

int q=-133;
int d=-2;
line(302+q-5,405+d,302+q-5,440+d);
line(338+q+5,405+d,338+q+5,440+d);
ellipse(327+q+5,405+d,108,180,35,30);

ellipse(313+q-5,406+d,360,74,35,30);


d=-77;
line(302+q-5,405+d,302+q-5,440+d);
line(338+q+5,405+d,338+q+5,440+d);
ellipse(327+q,405+d,105,180,30,25);

ellipse(313+q,405+d,360,80,30,25);
putpixel(163,300,11);
setfillstyle(6,15);
floodfill(163,330,15);
floodfill(160,380,15);

line(141,305,141,360);
line(101,310,101,365);
line(141,305,101,310);
line(141,360,101,365);


int x=70;
line(141,305+x,141,440);
line(101,310+x,101,440);
line(141,305+x,101,310+x);



q=-200;
line(302+q+4,405+d,302+q+4,440+d);
line(338+q-1,405+d,338+q-1,440+d-2);
ellipse(327+q,405+d,105,180,20,15);
ellipse(313+q+4,405+d,360,80,20,15);

d=1;
line(302+q+4,405+d,302+q+4,440+d-2);
line(338+q-1,405+d,338+q-1,440+d-2);
ellipse(327+q,405+d,105,180,20,15);
ellipse(313+q+4,405+d,360,80,20,15);

rectangle(178,415,197,439);
setfillstyle(7,15);
floodfill(179,416,15);
 rectangle(178,415-75,197,440-76);
setfillstyle(7,15);
floodfill(179,415-75+1,15);

line(130-3,417,130-3,440);
line(113+3,420,113+3,440);

line(113+3,420,130-3,417);
putpixel(114,423,4);
line(113,440,130,440);
floodfill(114+3,423,15);



int a=-76;
line(130-3,417+a,130-3,440+a-3);
line(113+3,420+a,113+3,440+a);

line(113+3,420+a,130-3,417+a);
putpixel(114,423,4);
floodfill(114+3,423+a,15);



line(10,400+h,615,400+h);



//////////////////////////////////////////////right\\\\\\\\\\\


int e=270;
rectangle(150+e,283,226+e,294);
line(146+e+4,294,225+e,294);
line(146+e+4,298,225+e,298);


line(150+e+80,240,150+e+80,440);            //pole
line(146+e+80,240,146+e+80,440);

line(150+e+80,299,150+e+80,440);            //pole
line(146+e+80,299,146+e+80,440);





l=400;
h=+149;
ellipse(51+l,132+h-7,340,216,4,15);
ellipse(62+l,131+h-7,327,216,4,15);
ellipse(72+l,132+h-7,327,216,2,15);
ellipse(42+l,132+h-7,327,216,2,15);
ellipse(57+l,107+h,0,170,16,5);
line(40+l,107+h,40+l,140+h-7);
line(75+l,107+h,75+l,140+h-7);

line(34+l,107+h,40+l,107+h);
line(75+l,107+h,81+l,107+h);

line(34+l,107+h,28+l,102+h);                      //slant
line(81+l,107+h,87+l,102+h);

line(28+l,102+h,34+l,98+h);
line(87+l,102+h,81+l,98+h);

line(34+l,98+h,58+l,95+h);
line(58+l,95+h,81+l,98+h);


ellipse(65+l,92+h,104,190,30,30);

ellipse(50+l,92+h,350,76,30,30);

line(58+l,61+h,58+l,63+h);
circle(58+l,58+h,3);
line(58+l,55+h,58+l,53+h);
circle(58+l,50+h,2);
line(58+l,48+h,58+l,47+h);
circle(58+l,45+h,1);
line(58+l,44+h,58+l,41+h);

r=270;
n=n-15;

ellipse(227+r,206+n,0,180,9,1);
ellipse(227+r,204+n,0,180,9,1);
putpixel(220+r,204+n,15);
putpixel(220+r,205+n,15);
putpixel(220+r,206+n,15);
putpixel(235+r,204+n,15);
putpixel(235+r,205+n,15);
putpixel(235+r,206+n,15);

ellipse(227+r,203+n,0,180,6,7);
line(227+r,195+n,227+r,192+n);



line(146+e+135,302,97+e+135,294);
line(146+e+135,306,97+e+135,298);

line(146+e+135,291,97+e+135,283);



line(100-5+e+190,240+15,100-5+e+190,440);            //pole
line(96-5+e+190,240+15,96-5+e+190,440);





r=325;
n+=15;
ellipse(227+r,206+n,0,180,9,1);
ellipse(227+r,204+n,0,180,9,1);
putpixel(220+r,204+n,15);
putpixel(220+r,205+n,15);
putpixel(220+r,206+n,15);
putpixel(235+r,204+n,15);
putpixel(235+r,205+n,15);
putpixel(235+r,206+n,15);

ellipse(227+r,203+n,0,180,6,7);
line(227+r,195+n,227+r,192+n);


rectangle(155+e,302,220+e,364);
rectangle(155+e,302+70,220+e,364+75);


q=140;
d-=1;
line(302+q-5,405+d,302+q-5,440+d);
line(338+q+5,405+d,338+q+5,440+d);
ellipse(327+q+5,405+d,108,180,35,30);

ellipse(313+q-5,406+d,360,74,35,30);

d=-77;
line(302+q-5,405+d,302+q-5,440+d);
line(338+q+5,405+d,338+q+5,440+d);
ellipse(327+q,405+d,105,180,30,25);

ellipse(313+q,405+d,360,80,30,25);
putpixel(163,300,11);
setfillstyle(6,15);
floodfill(163,330,15);
floodfill(160,380,15);
/////////////////////////////
e=e-15;
line(141+e+150,305+5,141+e+150,360+5);
line(101+e+150,310-5,101+e+150,365-5);
line(101+e+150,305,141+e+150,310);
line(101+e+150,360,141+e+150,365);

int v=75;
line(141+e+150,305+5+v-5,141+e+150,440);
line(101+e+150,310-5+v-5,101+e+150,440);
line(101+e+150,305+v-5,141+e+150,310+v-5);
//line(101+e+150,360+v,141+e+150,365+v);

e=e+18;
rectangle(178+e,415,197+e,439);
setfillstyle(7,15);
floodfill(179+e,416,15);
int f=-75;
rectangle(178+e,415+f,197+e,439+f);
setfillstyle(7,15);
floodfill(179+e,416+f,15);


e+=130;
line(130-3+e,440+a-2,130-3+e,417+a+2);
line(113+3+e,440+a-2,113+3+e,420+a-2);

line(113+3+e,417+a,130-3+e,420+a);
putpixel(114+e,423,4);
floodfill(114+3+e,423+a,15);

a=1;
line(130-3+e,440+a-2,130-3+e,417+a+2);
line(113+3+e,440+a-2,113+3+e,420+a-2);

line(113+3+e,417+a,130-3+e,420+a);
putpixel(114+e,423,4);
line(113+3+e,440,130-3+e,440);
floodfill(114+3+e,423+a,15);


q=204;
line(302+q+4,405+d,302+q+4,440+d-2);
line(338+q-1,405+d,338+q-1,440+d+2);
ellipse(327+q,405+d,105,180,20,15);
ellipse(313+q+4,405+d,360,80,20,15);
q=204;

d=0;
line(302+q+4,405+d,302+q+4,440+d-1);
line(338+q-1,405+d,338+q-1,440+d);
ellipse(327+q,405+d,105,180,20,15);
ellipse(313+q+4,405+d,360,80,20,15);
line(302+q+4,440,302+q+4,440);




setfillstyle(10,15);
floodfill(322,160,15);
setfillstyle(6,15);

floodfill(322,193,15);
///////////////////////////////////////////////walls//////////////
setfillstyle(9,15);
floodfill(110,294,15);
floodfill(210,290,15);
floodfill(430,290,15);
floodfill(520,290,15);
/////////////////////////////////////////////poles
setfillstyle(6,15);
floodfill(93,394,15);
floodfill(148,394,15);
floodfill(227,394,15);
floodfill(417,394,15);
floodfill(498,394,15);
floodfill(553,394,15);


setfillstyle(9,15);
floodfill(185,224,15);
floodfill(465,224,15);



while(!kbhit())
{
delay(40);
putpixel(random(640),random(248),random(15));
 }

  getch();
cleardevice();

setcolor(13);
rectangle(1,1,639,479);
rectangle(15,15,624,464);
//setcolor(LIGHTBLUE);
setfillstyle(6,11);

floodfill(2,2,13);
settextstyle(7,0,3);
setcolor(12);


outtextxy(150,200,"MADE BY : Rajesh Pawar") ;


//delay(1000);
getch();




 return 0;
}

Happy Coding