129.飘带图案

简介: 129.飘带图案
/* linesin */
#include <graphics.h>
#include <math.h>
#define PI 3.1415926
void main()
{
  double a;
  int x1,y1,x2,px=320,py=240;
  int gdriver=DETECT,gmode;
  initgraph(&gdriver,&gmode,"c:\\tc");
  cleardevice();
  setcolor(4);
  outtextxy(80,20,"This program show the Linesin picture.");
  for(a=0;a<=PI;a+=PI/380)
  {
    x1=px+280*cos(1.6*a);
    y1=479-((90*sin(8*a))*cos(a/2.5)+py);
    x2=py+280*cos(1.8*a);
    line(x1,y1,x2,y1);
  }
  outtextxy(80,460,"Press any key to quit...");
  getch();
  closegraph();
}
相关文章
|
4天前
一个最优美的图案
【6月更文挑战第30天】一个最优美的图案。
11 2
|
2月前
|
数据可视化 定位技术 开发者
黑白或彩色线稿地图设计定制装饰画中线条轮廓素材底图获取方法合集
黑白或彩色线稿地图设计定制装饰画中线条轮廓素材底图获取方法合集
|
8月前
颜色拾取器
颜色拾取器
34 0
|
11月前
|
编译器 Windows
<1>[QTCN]颜色拾取器
桌面置顶 获取全局鼠标坐标和颜色(Web值、RGB) 新增: 按下鼠标右键停止/开启
74 1
牛客网——空心正方形图案
牛客网——空心正方形图案
96 0