、

#include <graphics.h> // EasyX图形库头文件
#include <conio.h> // 用于_getch()
#include <math.h>
#define a 0 // 从原点开始
#define b 60*3.1415/180 //半径增加的速率
int main()
{
int x,y;
// 初始化640x480像素的图形窗口
initgraph(640, 480);
for (int i = 0; i < 360*30; i++) {
x = 320 + (a+ b * (i * 3.1415 / 180)) * cos(i * 3.1415 / 180);
y= 240+ (a + b * (i * 3.1415 / 180)) * sin(i * 3.1415 / 180);
putpixel(x, y, YELLOW);
}
// 保持窗口显示
_getch();
// 关闭图形窗口
closegraph();
return 0;
}
运行结果:
