رسم منزل بلغة ++C


رسم منزل بلغة ++C

#include<graphics.h>
#include<stdio.h>
#include<conio.h>

void main()
 {
  int gd=DETECT,gm;
  initgraph(&gd,&gm,"..\\BGi");

      while(!kbhit())
      {
      arc(60,40,150,-90,20);    //** this is for the moon.
      arc(62,40,150,-90,20);

      line(0,300,120,300);      //** ground first line.
      delay(10);
      line(530,300,650,300);    //** ground second line.
      delay(10);
      line(120,350,260,380);    //** at the down of the gate.
      delay(10);
      line(247,379,247,230);
      delay(10);
      line(135,240,170,237);
      delay(10);
      line(135,240,135,300);
      delay(10);
      line(135,300,170,300);    //** first window.
      delay(10);
      line(170,300,170,236);    //** window second line.
      delay(10);
      line(152,300,152,237);    //** third line.
      delay(10);

      line(247,230,195,233);    //** line on the gate.
      delay(10);
      line(195,233,195,368);    //** tuch circle line
      delay(10);
      line(260,380,530,330);    //** down side at big window.
      delay(10);
      line(530,330,530,275);    //** last wall at back side.
      delay(10);

      line(260,220,285,250);    //** down side ot the roof.
      delay(10);
      line(285,250,540,275);
      delay(10);
      line(260,380,260,220);    //** right side wall with gate.
      delay(10);
      line(495,200,540,275);
      delay(10);
      line(194,143,495,200);    //** upper side of roof line.
      delay(10);
      line(200,150,194,143);    //** edge of top of the roof.
      delay(10);
      line(194,143,285,250);
      delay(10);
      line(195,143,93,245);     //** roof at front from top to bottom.
      delay(10);
      line(93,245,120,245);
      delay(10);

      line(120,350,120,230);    //** first wall at leaft side.
      delay(10);
      line(120,230,200,150);    //** second window.
      delay(10);
      line(400,280,450,275);
      delay(10);
      line(450,275,450,315);
      delay(10);
      line(400,325,450,315);
      delay(10);
      line(400,324,400,279);
      delay(10);
      line(425,320,425,278);
      delay(10);
      line(450,296,400,302);
      delay(10);
      circle(205,300,5);        //** circle on the door.
      delay(10);

      putpixel(rand()%630,rand()%150,WHITE);//** for stars.
      delay(10);
    }
  getch();
  }

تنزيل المشروع : http://cut-win.com/jSdnQs



ليست هناك تعليقات:

يتم التشغيل بواسطة Blogger.