01-17-2026, 03:21 PM
This is totally useless, as the "draw ellipse" routine is far more useful in N7, but I was struck by the simplicity and effectiveness of this code, which I found on the "Basic programming language" group on Facebook.
Code:
visible screen_w = 640,screen_h = 480
'Open a window
set window "Easy circle",screen_w,screen_h
'enable double buffering
set redraw off
do
'clear the screen
set color 255,255,255
cls
set color 0,0,0
'draw some pixels
e = 1/32
x = 30 ' radius
y = 0
for i = 0 to 199
x = x - y*e
y = y + x*e
draw pixel x + 200,y + 200 ' 200,200 is the center of the circle
next
'copy back buffer to the screen
redraw
'cap FPS to 60
fwait 60
until keydown(KEY_ESCAPE)
