Рет қаралды 273
"Lissajous Curves"
A codereview of this small BASIC Program for the Commander X16.
The programm is easy portable to any other Basic dialect of any 8-/16-bit homecomputer.
Code:
10 REM ******************************
11 REM ** LISSAJOUS CURVES - X16 **
12 REM ******************************
15 CLS: SCREEN$80: COLOR5,0: GOSUB 99
20 C=1:DX=35: DY=35: PI=3.1415926535
25 FOR A=1 TO 4
30 FOR B=1 TO 3
35 COLORC,0: C=C+1
40 FOR T=0 TO 2*PI STEP .02
45 X=DX*(2*A-1)+DX*SIN(A*T+T+1)*.75+15
50 Y=DY*(2*B-1)+DY*SIN(B*T+T)*.75+15
55 IFT=0 THENPSETX,Y,C:XS=X:YS=Y:GOTO65
60 LINE XS,YS,X,Y,C: XS=X: YS=Y:
65 NEXT T, B, A
70 GET A$: IF A$="" THEN GOTO 70
75 GOSUB 99: COLOR5,0: CLS: LIST: END
99 FOR I=0 TO 239: LINE0,I,319,I,0:NEXT I:RETURN
#lissajous #basic #commanderx16 #x16 #retro #programming #commodore #apple #atari #sinclair #c64 #amiga #retrocomputing #codereview #retrographics #computerscience #techeducation #digital art