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;
	...
    
    
    
    /* 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();
}文章来源: blog.csdn.net,作者:程序员编程指南,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/weixin_41055260/article/details/124655903
        【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
            cloudbbs@huaweicloud.com
        
        
        
        
        - 点赞
- 收藏
- 关注作者
 
             
           
评论(0)