座標 x 的平方+ 座標 y 的平方 = 半徑 r 的平方
x = rcos(theta)、y = rsin(theta)
將其代入原式可得
rcos(theta)平方 + rsin(theta)平方 = r平方
= r 平方(cos(theta)平方+sin(theta)平方)
= r 平方
左式的 cos(theta)平方+sin(theta)平方 = 1,故左式=右式
使用 PointOut(x,y,options)去在螢幕上畫點
範例:
task main()
{
float thata = 0;
int r = 1;
while(theta < 2*PI)
{
PointOut(r*cos(theta),r*sin(theta),false);
theta = theta + 0.01;
}
while(1){}
}