Skip to content

Instantly share code, notes, and snippets.

@kreshikhin
Created November 22, 2014 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kreshikhin/38e64b404d7f00c39d4f to your computer and use it in GitHub Desktop.
Save kreshikhin/38e64b404d7f00c39d4f to your computer and use it in GitHub Desktop.
REM Sample circle drawing without using the CIRCLE command
DIM i, r, x, y, q AS FLOAT
DIM ax, ay, zx, zy, dx, dy AS INTEGER
x = 127
y = 87
r = 40
q = 1 / r
FOR i = 0 TO PI / 2 STEP q
dy = SIN(i) * r
dx = COS(i) * r
zx = x - dx
zy = y - dy
ax = x + dx
ay = y + dy
PLOT ax, ay
PLOT zx, ay
PLOT ax, zy
PLOT zx, zy
NEXT i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment