您的位置: proteus仿真社区 >> 论坛 >> 单片机仿真 >> 查看帖子
字体: 小 中 大 | 打印 发表于: 2008-8-31 15:10 作者: wanghong 来源: proteus仿真社区
最新回复
wanghong (2008-8-31 15:12:24)
void hua_yuan(uchar Ox,uchar Oy,uchar Rx)
{
unsigned int xx,rr,xt,yt,rs;
yt = Rx;
rr = Rx * Rx + 1; //补偿 1 修正方形
rs =(yt + (yt >> 1)) >>1; //0.75)分开1/8圆弧来画
for(xt = 0; xt <= rs; xt++)
{
xx = xt * xt;
while((yt*yt) > (rr-xx))
{
yt--;
}
col = Ox + xt; //第一象限
row = Oy - yt;
dian(row,col);
col = Ox - xt; //第二象限
dian(row,col);
row = Oy + yt; //第三象限
dian(row,col);
col = Ox + xt; //第四象限
dian(row,col);
//***************45度镜象画另一半***************
col = Ox + yt; //第/一象限
row = Oy - xt;
dian(row,col);
col = Ox - yt; //第/二象限
dian(row,col);
row = Oy + xt; //第/三象限
dian(row,col);
col = Ox + yt; //第/四象限
dian(row,col);
}
}
shunter (2008-8-31 20:24:04)
wanghong (2008-9-05 14:30:58)
wanghong (2008-9-06 08:16:28)