Re: A86: Drawing circles


[Prev][Next][Index][Thread]

Re: A86: Drawing circles



center of circle is cx,cy
and radius is r


Cls
Screen 12
x=0
y=r
d=3-(2*r)
While x<=y
PtOn(xc+x,yc+y)
PtOn(xc+x,yc-y)
PtOn(xc-x,yc+y)
PtOn(xc-x,yc-y)
PtOn(yc+y,xc+x)
PtOn(yc+y,xc-x)
PtOn(yc-y,xc+x)
PtOn(yc-y,xc-x)
If d<0 Then
d=d+4*x+6
Else
d=d+4*(x-y)+10
End If
x=x+1
Wend

this is a quick basic version i havent tried it out on quick basic yet but it
should work

Patrick


Follow-Ups: References: