int i,j;
for(i=0;i<L_hw;i++)
{ Set(i,L_hw/2);Set(L_hw/2,i);}
double Dt=0.005;
double cosTh1,sinTh1,cosTh,sinTh;
int tmpX,tmpY;
double A = 75;
cosTh1=1;sinTh1=0;cosTh=1;sinTh=0;
for (i = 0;i<629;i++)
{
cosTh1 = cosTh*1 -sinTh*Dt;
sinTh1 = sinTh*1 +cosTh*Dt;
tmpX = cosTh*A;
tmpY = sinTh*A;
Set(tmpX+Xoff,tmpY+Yoff);Set(tmpX+Xoff,Yoff-tmpY);
cosTh = cosTh1 ;
sinTh = sinTh1 ;
}
网友评论