我们要做一个锅炉手工温控的程序,老师说我们的图形太差了,有人肯帮忙改一下图形界面
,能显示动态火焰效果的火及将锅炉和温度计做得更逼真得,不胜感激 不胜感激
不胜感激
# include<stdio.h>
# include<graphics.h>
# include<stdlib.h>
# include<conio.h>
# include<time.h>
void paintout();
void thermograph();
void fire();
void main()
{
int driver=DETECT;
int mode;
initgraph(&driver,&mode,"");
paintout();
fire();
thermograph();
getch();
closegraph();
}
void paintout()
{
setbkcolor(10);
setlinestyle(0,0,3);
setcolor(6);
line(250,80,250,100);
setlinestyle(0,0,3);
line(250,115,250,350);
setlinestyle(0,0,3);
line(250,100,200,100);
setlinestyle(0,0,3);
line(250,115,200,115);
setlinestyle(0,0,3);
arc(200,100,180,270,15);
setlinestyle(0,0,3);
line(185,100,185,0);
setlinestyle(0,0,3);
line(200,100,200,0);
setlinestyle(0,0,3);
line(500,350,500,340);
setlinestyle(0,0,3);
line(500,325,500,80);
setlinestyle(0,0,3);
line(500,325,550,325);
setlinestyle(0,0,3);
line(500,340,550,340);
setlinestyle(0,0,3);
line(520,320,540,320);
setlinestyle(0,0,3);
line(530,320,530,340);
setlinestyle(0,0,3);
arc(550,340,0,90,15);
setlinestyle(0,0,3);
line(550,340,550,350);
setlinestyle(0,0,3);
line(565,340,565,350);
setlinestyle(0,0,3);
ellipse(375,350,180,360,125,50);
setlinestyle(0,0,3);
ellipse(375,80,0,180,125,50);
setlinestyle(0,0,3);
ellipse(375,150,0,360,125,50);
setfillstyle(1,9);
fillellipse(375,150,125,50);
floodfill(375,349,6);
setlinestyle(0,0,3);
ellipse(375,80,180,360,125,50);
}
void thermograph()
{
int y=0,i;
char str[3];
setlinestyle(0,0,3);
setcolor(8);
line(250,175,200,175);
line(200,200,250,275);
rectangle(120,170,200,200);
setcolor(8);
line(160,170,160,200);
setfillstyle(1,13);
setcolor(1);
setviewport(120,170,200,200,0);
settextstyle(0,0,2);
outtextxy(40,5,"`C");
for(i=0;y<10;i++)
{
y++;
itoa(y,str,10);
bar(0,0,40,30);
delay(80000);
delay(80000);
delay(80000);
outtextxy(5,5,str);
delay(80000);
delay(80000);
delay(80000);
delay(80000);
}
}
void fire()
{
setlinestyle(0,0,3);
setcolor(BLUE);
line(229,475,229,380);
line(521,475,521,380);
setcolor(4);
line(229,475,521,475);
line(230,475,275,425);
line(275,425,300,450);
line(300,450,400,400);
line(400,400,450,450);
line(450,450,500,425);
line(500,425,520,475);
setfillstyle(1,4);
floodfill(400,460,4);
}