CLEAR ALL
SCREEN 4
DOUBLE BUFFER
DO
    FOR i=-40 TO 40
        GOSUB drawSineWave
    NEXT i
    FOR i=40 TO -40 STEP -1
        GOSUB drawSineWave
    NEXT i
LOOP WHILE INKEY$=""
END
drawSineWave:
INK PLASMA.COLOR
FOR x=0 TO 319
    y=INT(90+i*SIN(x/10))
    PLOT x,y
NEXT x
SWAP BUFFERS CLS
PAUSE
RETURN
