博客
关于我
送你一颗心Easyx
阅读量:323 次
发布时间:2019-03-04

本文共 744 字,大约阅读时间需要 2 分钟。

在这里插入图片描述

#include 
#include
#include
#include
#include
#define a 60#define PI 3.1415926double th=PI/180;void StartPic(void){ //int gr=DETECTgm; //initgraph(&gr,&gm,"e://turboc2"); initgraph(800,600); cleardevice();}void ClosePic(void){ getch();}void DrawXin(int x0,int y0,int k){ double i,x,y,tx,ty; for(i=-180.0;i<180.0;i+=0.01) { x = a*(2*cos(i*th)-cos(2*i*th)); y = a*(2*sin(i*th)-sin(2*i*th)); tx = x; ty = y; x = tx*cos(k*th)-ty*sin(k*th)+x0; y = y0-(ty*cos(k*th)+tx*sin(k*th)); putpixel(x,y,RED); setfillstyle(1,RED); floodfill(500,500,RED); }}void main(void){ StartPic(); DrawXin(320,240,90); setfillcolor(RGB(255,0,0)); floodfill(350,250,RGB(255,255,0)); ClosePic();}

转载地址:http://srsh.baihongyu.com/

你可能感兴趣的文章
快速学习汇编之 通用寄存器
查看>>
快速学习汇编之 常见汇编指令
查看>>
变量覆盖漏洞
查看>>
weblogic之cve-2015-4852
查看>>
Java注释
查看>>
水调歌头·1024
查看>>
对不起
查看>>
C++ 函数重载
查看>>
【并发编程】实现多线程的几种方式
查看>>
Nginx简介
查看>>
Nginx的Gzip功能
查看>>
基于.Net Core 5.0 Worker Service 的 Quart 服务
查看>>
ASP.net 常用服务器控件
查看>>
Azure Storage 系列(四)在.Net 上使用Table Storage
查看>>
我成为 Microsoft Azure MVP 啦!(ps:不是美国职业篮球)
查看>>
异步编程基础
查看>>
[模板] 带修莫队
查看>>
* 二维数组的使用
查看>>
a instanceof A:判断对象a是否是类A的实例。如果是,返回true;如果不是,返回false
查看>>
abstract关键字的使用
查看>>