Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -7,33 +7,33 @@ color blue
|
|||
call DrawCircle(200,200,50)
|
||||
refresh
|
||||
|
||||
#Function DrawCircle
|
||||
#1st param = X-coord of center
|
||||
#2nd param = Y-coord of center
|
||||
#3rd param = radius
|
||||
#Function DrawCircle
|
||||
#1st param = X-coord of center
|
||||
#2nd param = Y-coord of center
|
||||
#3rd param = radius
|
||||
Function DrawCircle(x0,y0,radius)
|
||||
x=radius
|
||||
y=0
|
||||
decisionOver2=1-x
|
||||
x=radius
|
||||
y=0
|
||||
decisionOver2=1-x
|
||||
|
||||
while x>=y
|
||||
plot( x + x0, y + y0)
|
||||
plot( y + x0, x + y0)
|
||||
plot(-x + x0, y + y0)
|
||||
plot(-y + x0, x + y0)
|
||||
plot(-x + x0, -y + y0)
|
||||
plot(-y + x0, -x + y0)
|
||||
plot( x + x0, -y + y0)
|
||||
plot( y + x0, -x + y0)
|
||||
while x>=y
|
||||
plot( x + x0, y + y0)
|
||||
plot( y + x0, x + y0)
|
||||
plot(-x + x0, y + y0)
|
||||
plot(-y + x0, x + y0)
|
||||
plot(-x + x0, -y + y0)
|
||||
plot(-y + x0, -x + y0)
|
||||
plot( x + x0, -y + y0)
|
||||
plot( y + x0, -x + y0)
|
||||
|
||||
y++
|
||||
y++
|
||||
|
||||
if decisionOver2<=0 then
|
||||
decisionOver2+=2*y+1
|
||||
else
|
||||
x--
|
||||
decisionOver2+=2*(y-x)+1
|
||||
end if
|
||||
end while
|
||||
return 0
|
||||
if decisionOver2<=0 then
|
||||
decisionOver2+=2*y+1
|
||||
else
|
||||
x--
|
||||
decisionOver2+=2*(y-x)+1
|
||||
end if
|
||||
end while
|
||||
return 0
|
||||
End Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue