一个加easy图形库的小程序,有两行不理解,求指教
#include<stdio.h>#include<graphics.h>
#include<math.h>
#define PI 3.14
int main()
{
void welecome();
initgraph(1200,600);
setbkcolor(RED);
cleardevice();
welecome();
getchar();
return 0;
}
void welecome()
{
settextcolor(YELLOW);
int x = 500, y =200;
for (int i = 0; i < 50; i++)
{
settextstyle(i, 0, L"华文行楷");
int x = 500 + int(180 * sin(PI * 2 * i / 60));
int y = 200 + int(180 * cos(PI * 2 * i / 60));
cleardevice();
outtextxy(x, y, L"情人节");
outtextxy(x + 80, y + 60, L"献给某某某");
Sleep(30);
}
getchar();
cleardevice();
}
不清楚这两行确定文字的坐标具体是怎样得到的,求解释
int x = 500 + int(180 * sin(PI * 2 * i / 60));
int y = 200 + int(180 * cos(PI * 2 * i / 60));