给你个三视图吧,不行我也没办法拉,画图我只会这么点三角猫功夫 #include<graphics.h> #include<stdio.h> #include<conio.h> main() {float r1,r2,h; int gd=DETECT,gm; initgraph(&gd,&gm,"");
textcolor(GREEN); directvideo=0; gotoxy(5,2);cprintf("Input r1=");cscanf("%f",&r1); gotoxy(5,4);cprintf("Input r2=");cscanf("%f",&r2); gotoxy(5,6);cprintf("Input h =");cscanf("%f",&h); cleardevice(); setbkcolor(CYAN); setcolor(BLUE); line(0,240,680,240); line(320,0,320,480); setcolor(RED);
outtextxy(10,10,"This is a forward sight:"); line(150-r1,100,150+r1,100); line(150-r2,100+h,150+r2,100+h); line(150-r1,100,150-r2,100+h); line(150+r1,100,150+r2,100+h);
outtextxy(330,10,"This is a side sight:"); line(470-r1,100,470+r1,100); line(470-r2,100+h,470+r2,100+h); line(470-r1,100,470-r2,100+h); line(470+r1,100,470+r2,100+h);
outtextxy(10,250,"This is a down sight:"); circle(150,350,r1); circle(150,350,r2);
setcolor(GREEN); bar(390,340,580,390); outtextxy(400,350,"copyright:牛虻"); outtextxy(400,370,"creattime:2005-6-28");
while(!kbhit()); cleardevice(); setcolor(BLUE); outtextxy(250,240,"THANKS FOR USING^_^"); sleep(2); closegraph(); }