132.心脏形图案

简介: 132.心脏形图案
/* Heart */
#include <graphics.h>
#include <math.h>
#define PI 3.1415926
void main()
{
  double a;
  int x,y,y1,r,r1;
  int gdriver=DETECT,gmode;
  initgraph(&gdriver,&gmode,"c:\\tc");
  printf("Please input Radus(<80): ");
  scanf("%d",&r);
  cleardevice();
  setbkcolor(9);
  setcolor(4);
  outtextxy(80,20,"This program show the Kidney picture.");
  y1=240-r;
  for(a=0;a<=2*PI;a+=PI/27)
  {
    x=320+r*cos(a);
    y=240+r*sin(a);
    r1=sqrt((x-320)*(x-320)+(y-y1)*(y-y1));
    circle(x,y,r1);
  }
  outtextxy(80,460,"Press any key to quit...");
  getch();
  closegraph();
}
相关文章
143.Mandelbrot分形图案
143.Mandelbrot分形图案
97 0
138.正方形螺旋拼块图案
138.正方形螺旋拼块图案
91 0
Photoshop使用钢笔路径绘制网状条纹
Photoshop使用钢笔路径绘制网状条纹
112 0
Photoshop制作空心圆柱体与立体烟缸
Photoshop制作空心圆柱体与立体烟缸
146 0

热门文章

最新文章