Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
fastgraphics
|
||||
clg
|
||||
color red
|
||||
call DrawCircle(150,100,100)
|
||||
refresh
|
||||
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(x0,y0,radius)
|
||||
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)
|
||||
|
||||
y++
|
||||
|
||||
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