A quick little port of some code from Facebook BASIC Programming Language group.
It draws 1 extra image vs the original due to math differences in the machines or differences in the interpreter, but it runs.
10 POKE65495,0:PMODE4,1:PCLS:SCREEN1,0
20 PI = 4 * ATN (1):Q = PI / 4:V = 3
25 FOR K = 0 TO 2 * PI STEP Q
30 A = 8 + V * 9
35 R = 3.5 * V
40 XS = 128 + A * COS (K):YS = 121 + A * SIN (K)
45 FOR I = 0 TO V - 2
50 A1 = 2 * PI / V * I
55 X1 = R * COS (A1):Y1 = R * SIN (A1)
60 FOR J = I + 1 TO V - 1
65 A2 = 2 * PI / V * J
70 X2 = R * COS (A2):Y2 = R * SIN (A2)
75 LINE( XS + X1,YS + Y1)-(XS + X2,YS + Y2),PSET
80 NEXT J,I
85 V = V + 1: NEXT K
90 GOTO 90
Edit:
Emerson Costa posted a fix for the extra polygon over on Facebook.
No comments:
Post a Comment