? 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,RADIUS,COL 'get the point on the graphics layer 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 > RADIUS*RADIUS THEN RETURN 'traditional filled circle code GCIRCLE X,Y,RADIUS,8 GPAINT PX,PY,COL,8 GCIRCLE X,Y,RADIUS,COL END
Author
12Me21
Updated
Rating
3 votes
Categories
Keywords
  • filled
  • circle
  • disk
0 Comment(s)