• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

How do I do a horizontally scrolling sine wave in Applesoft BASIC?

I tweaked this program from something I saw on the 8-bit Guy. Managed to get the wave to fill most of the screen, repeat, and end where it begins on the screen. However, I was wondering if I could get it to scroll horizontally across the screen? or draw from right to left? I don't know, I'm just playing with BASIC and wanted some pointers.

Program listing:
5 HGR
10 HCOLOR=3
20 FOR X=0 TO 278
30 LET Y=INT(-65*SIN(X*3.14/28))+70
40 HPLOT X,Y
50 NEXT X
60 GOTO 5
 
Back
Top