? Even More Perfectly Filled Circles ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Even More Perfectly Filled Circles

DEF GDISK X,Y,R,C 'get the point on the screen that is closest to the center of the circle VAR PX=MIN(MAX(X,0),512-1) VAR PY=MIN(MAX(Y,0),512-1) 'if the distance from the center of the circle to the closest onscreen point is 'larger than the radius, then the circle is completely offscreen VAR DX=PX-X VAR DY=PY-Y IF DX*DX+DY*DY > R*R THEN RETURN 'traditional filled circle code GCIRCLE X,Y,R,8 GPAINT PX,PY,C,8 GCIRCLE X,Y,R,C END
Author
12Me21
Updated
Rating
1 vote
Categories
Keywords
  • filled
  • circle
  • disk
0 Comment(s)