Created
November 22, 2014 14:48
-
-
Save kreshikhin/38e64b404d7f00c39d4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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