mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-23 11:33:07 +00:00
22 lines
570 B
QBasic
22 lines
570 B
QBasic
10 REM TWISTER-DEMO
|
|
15 REM https://8bitshack.org/post/twister/
|
|
20 GR
|
|
30 FOR A2 = 1 TO 360 STEP 3
|
|
40 AM = 120+COS(A2*0.0174533)*100
|
|
50 AN = -3.141593+SIN(A2*0.0174533)*3.141593
|
|
60 FOR Y = 1 TO 39 STEP 2
|
|
65 FV = Y*4/AM+AN
|
|
70 X1 = 8*SIN(FV)
|
|
80 X2 = 8*SIN(FV+1.570796)
|
|
95 X3 = -X1
|
|
105 X4 = -X2
|
|
108 COLOR = 0: HLIN 10,30 AT Y
|
|
109 COLOR = 1
|
|
110 IF X1 < X2 THEN HLIN 20+X1,20+X2 AT Y: GOTO 130
|
|
120 IF X3 < X4 THEN HLIN 20+X3,20+X4 AT Y
|
|
130 COLOR = 2 : IF X2 < X3 THEN HLIN 20+X2,20+X3 AT Y: GOTO 150
|
|
140 IF X4 < X1 THEN HLIN 20+X4,20+X1 AT Y
|
|
150 NEXT Y
|
|
160 NEXT A2
|
|
170 GOTO 30
|