set display mode 800, 600, 32:sync on:hide mouse:randomize timer():ink rgb(255, 255, 255), rgb(0, 0, 0):radius=75:anglex=rnd(360):x=400:y=300
do:mx=mousemovex():cls
if anglex>=337.5 or anglex=<22.5 then dir$="SO"
if anglex>=292.5 and anglex=<337.5 then dir$="SW"
if anglex>=247.5 and anglex=<292.5 then dir$="WE"
if anglex>=202.5 and anglex=<247.5 then dir$="NW"
if anglex>=157.5 and anglex=<202.5 then dir$="NO"
if anglex>=112.5 and anglex=<157.5 then dir$="NE"
if anglex>=67.5 and anglex=<112.5 then dir$="EA"
if anglex>=22.5 and anglex=<67.5 then dir$="SE"
if mouseclick()=1 and radius>1 then radius=radius-1
if mouseclick()=2 and radius<250 then radius=radius+1
lx=int(sin(anglex)*(radius-(radius/10)*2)):ly=int(cos(anglex)*(radius-(radius/10)*2))
cx=int(sin(anglex)*(radius-(radius/10))):cy=int(cos(anglex)*(radius-(radius/10)))
tx=int(sin(anglex)*(radius+(radius/10)*2)):ty=int(cos(anglex)*(radius+(radius/10)*2))
circle x, y, radius:circle cx+x, cy+y, (radius/10):line x, y, lx+x, ly+y:center text tx+x, ty+y, dir$:text 1, 1, "Use mouse to rotate needle, and left/right click to scale compass":sync
if mx<>0 then anglex=anglex-mx
if anglex<1 then anglex=anglex+360
if anglex>360 then anglex=anglex-360
loop
whipped this up for my own purposes; figured i'd drop it here as well. it just barely qualified.
comments?
"Creativity is knowing how to hide your sources" - Einstein