Home   Easy-Code    Forum  Updater 
Twitter Facebook



Ganesh using c graphics

Critics Rating:

Users Rating:



          /* GANESH */



#include <graphics.h>

#include <dos.h>

#include <stdlib.h>

main()

{

   int gd=0,gm=0,i,j=800,r,c;

   initgraph(&gd,&gm,"");

   cleardevice();

   line(160,240,410,240);

   line(170,250,400,250);

   line(160,240,160,256);

   line(170,250,160,256);

   line(410,240,410,256);

   line(400,250,410,256);

   line(260,240,220,240);

   line(220,240,220,230);

   line(220,230,200,225);

   line(200,225,200,200);

   line(200,200,220,200);

   line(220,200,260,220);

   line(266,226,280,220);

   line(270,240,280,240);

   line(280,240,280,230);

   line(270,240,266,234);

   arc(280,225,270,0,5);

   line(340,240,380,230);

   line(380,230,380,200);

   line(380,200,340,200);

   line(340,200,300,230);

   line(320,240,300,230);

   line(319,240,300,231);

   line(318,240,300,232);

   line(317,240,300,233);

   line(316,240,300,234);

   line(294,236,290,240);

   line(290,240,280,240);

   line(280,244,290,250);

   line(289,250,296,260);

   line(296,260,306,260);

   line(306,260,300,250);

   line(300,250,306,240);

   line(202,200,202,198);

   line(218,200,218,198);

   line(202,198,218,198);

   line(203,198,203,196);

   line(217,198,217,196);

   line(203,196,217,196);

   line(206,194,200,190);

   line(217,196,220,190);

   line(200,190,200,170);

   line(220,190,220,180);

   line(205,180,205,170);

   arc(203,170,0,180,2);

   line(210,180,210,169);

   arc(208,169,0,180,2);

   line(214,180,214,169);

   arc(212.5,169,0,180,2);

   line(217,180,217,170);

   arc(216,170,0,180,1);

   line(220,180,218,180);

   line(216,180,217,186);

   line(378,200,378,196);

   line(352,200,352,196);

   line(378,196,352,196);

   line(354,196,354,190);

   line(370,196,370,192);

   line(370,192,380,186);

   line(354,190,360,186);

   line(390,186,350,186);

   line(350,186,346,184);

   line(390,186,394,184);

   line(346,184,394,184);

   arc(354,186,0,180,5);

   arc(359,186,0,180,5);

   arc(364,186,0,180,5);

   arc(369,186,0,180,5);

   arc(374,186,0,180,5);

   arc(379,186,0,180,5);

   arc(384,186,0,180,5);

   arc(359,182,0,180,5);

   arc(364,182,0,180,5);

   arc(369,182,0,180,5);

   arc(374,182,0,180,5);

   arc(379,182,0,180,5);

   arc(364,178,0,180,5);

   arc(369,178,0,180,5);

   arc(374,178,0,180,5);

   arc(369,176,0,180,7);

   line(330,140,330,110);

   line(250,140,250,110);

   line(330,110,310,100);

   line(250,110,270,100);

   line(310,100,270,100);

   line(330,140,300,160);

   line(250,140,280,160);

   line(300,160,300,180);

   line(280,160,280,190);

   arc(290,190,180,260,10);

   arc(310,180,180,360,10);

   arc(330,190,270,360,10);

   line(340,190,340,170);

   line(320,180,320,170);

   arc(330,170,90,180,10);

   arc(350,170,90,180,10);

   line(350,160,330,160);

   line(330,80,250,80);

   line(330,70,250,70);

   line(330,80,350,100);

   line(330,70,350,90);

   line(250,80,230,100);

   line(250,70,230,90);

   arc(240,90,180,230,10);

   arc(340,90,320,360,10);

   arc(240,90,240,270,3);

   line(250,90,240,100);

   line(330,90,340,100);

   line(260,90,250,100);

   line(320,90,330,100);

   arc(250,90,220,270,10);

   arc(330,90,270,320,10);

   line(320,50,260,50);

   line(320,50,330,60);

   line(260,50,250,60);

   arc(260,60,180,270,10);

   arc(320,60,270,360,10);

   rectangle(270,40,310,50);

   line(240,100,240,150);

   line(340,100,340,150);

   line(240,150,210,150);

   line(340,150,380,150);

   line(240,100,210,100);

   line(340,100,380,100);

   line(210,150,210,120);

   line(210,120,200,110);

   line(380,150,380,120);

   line(380,120,390,110);

   arc(210,110,90,180,10);

   arc(380,110,0,93,10);

   line(230,150,230,202);

   line(350,200,350,150);

   line(250,160,250,190);

   line(250,190,280,190);

   line(250,160,240,150);

   line(250,160,260,150);

   line(289,200,330,200);

   rectangle(180,250,190,260);

   rectangle(380,250,390,260);

   rectangle(278,33,303,40);

   ellipse(185,265,0,360,10,5);

   ellipse(385,265,0,360,10,5);

   line(270,90,310,90);

   line(270,94,310,94);

   line(270,100,270,90);

   line(310,100,310,90);

   line(270,124,260,120);

   line(270,125,260,120);

   line(270,126,260,120);

   line(270,127,260,120);

   line(310,124,320,120);

   line(310,125,320,120);

   line(310,126,320,120);

   line(310,127,320,120);

   /*Eyebrose*/

   arc(265,125,40,80,10);

   arc(315,125,100,140,10);

   line(40,400,80,400);

   line(480,400,520,400);

   line(480,400,500,360);

   line(520,400,500,360);

   line(40,400,60,360);

   line(80,400,60,360);

   while(!kbhit()){

   for(i=1;i<=3;i++){

delay(100);

   setcolor(random(15));

   circle(290,45,i*1);

   }

   for(i=1;i<=2;i++){

delay(100);

   setcolor(random(15));

   circle(290,36,i*1);

   }

   for(i=1;i<=8;i++){

   delay(100);

   setcolor(random(15));

   circle(290,60,i*1);

   }

   for(i=1;i<=28;i++){

   delay(100);

   setcolor(random(15));

   circle(100,100,i*1);

   }

   for(i=1;i<=28;i++){

   delay(100);

   setcolor(random(15));

   circle(490,100,i*1);

   }

   for(i=1;i<=4;i++){

   delay(100);

   setcolor(random(15));

   circle(210,185,i*1);

   }

   for(i=1;i<=5;i++){

   setcolor(random(15));

   line(60,360,70,300);

   line(60,360,50,300);

setcolor(random(15));

   line(60,360,55,300);

   line(60,360,65,300);

   setcolor(random(15));

   line(65,300,68,260);

   line(55,300,52,260);

setcolor(random(15));

   line(70,300,73,260);

   line(50,300,47,260);

setcolor(random(15));

   line(60,360,60,260);

   line(68,260,72,240);

setcolor(random(15));

   line(52,260,48,240);

   line(60,260,60,250);

setcolor(random(15));

   line(65,260,69,240);

   line(55,260,51,240);

setcolor(random(15));

   line(53,260,49,240);

   line(500,360,510,300);

setcolor(random(15));

   line(500,360,490,300);

   line(500,360,505,300);

setcolor(random(15));

   line(500,360,495,300);

   line(500,360,500,300);

   setcolor(random(15));

   line(500,300,500,252);

   line(495,300,492,260);

setcolor(random(15));

   line(505,300,508,260);

   line(490,300,487,260);

setcolor(random(15));

   line(510,300,513,260);

   line(492,260,489,240);

setcolor(random(15));

   line(489,260,486,240);

   line(505,260,507,240);

   setcolor(random(15));

   line(507,260,509,240);

   putpixel(random(640),random(400),15);

   }

   for(i=1;i<=4;i++){

   delay(100);

   setcolor(random(15));

   circle(210,185,i*1);

   }

/*      for(i=j;i<5000;i+=10)

      {

         sound(i);

         delay(10);

      }*/

      j=j+50;



   }

/*   nosound();*/

   setcolor(WHITE);

   settextstyle(1,HORIZ_DIR,6);

   outtextxy(175,300,"GANESH");

   settextstyle(1,HORIZ_DIR,3);

   outtextxy(500,450,"Aditya");

   getch();

}

Courtesy, Source, References & Regards: Kishore AVGK

While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright@2009-2011 by KuGuNi.com. All Rights Reserved.