Monday, February 11, 2013

Shared Program (2)


    Another shared program from Richard Duncan - Chesapeake, USA and works for iPad in Portrait orientation.

1 DIM C1(200)
12 NM = 1.1:WW=15
13 S6=-40:N=62:MIN=768
14 GOSUB 900
15 H = 0:SCREEN 1:CLS
16 ROWS = INT(1004/ (N)) - 1:PRINT "rows1=";ROWS
17 R1 = INT(768/ (N * NM))
18 IF R1 < ROWS THEN ROWS = R1
19 IF N < 12 THEN ROWS = ROWS - 1
20 IF MIN < 3100 THEN ROWS = ROWS - 2
21 S5ARTS= 768- INT(ROWS * N * NM + 0.5)
22 S5ARTS= INT(S5ART* 0.5 + 0.5) + INT(N * 1.2 + 0.5)
23 S5ARTS=S5ARTS- 37
25 IF N < 30 THEN ROWS = ROWS - 1
26 HH = INT(0.866 * N * NR + 0.5)
27 NR = 0.44
28 HH = INT(0.866 * N * NR + 0.5): H = HH
29 H = H * 1.5 + 45:PRINT "s5art=";S5ART
30 REM FOR E=1 TO 1004:CSET C1(20),RD(20),GR(20),BL(20),255
32 FOR K = 1 TO ROWS-1
34 NO = ROWS - K
35 Q=768-(NO-1)*88
36 S5ART = Q/2:OS5=S5ART
37 LOWER = INT(0.866 * N + 0.5)
41 GOSUB 400
43 H = H - HH
44 GOSUB 450
47 H = H + LOWER
48 NN = N
49 N = INT(N * 0.4 + 0.5)
50 LOWER = INT(0.866 * N + 0.5)
52 GOSUB 480
58 N = NN
59 H = H + LOWER+2
60 NEXT K
62 GOTO 500
200 TPS= INT(N * 0.866 + 0.5)
205 FOR I = 0 TO TPS
210 L= INT(I * 0.5 * NM + 0.5)
213 C=C1(W)
214 CSET C,RD(W),GR(W),BL(W),255
215 LINE G-L,I+70,G+L,I+70,C
216 LINE G-L,I+71,G+L,I+71,C
217 NEXT I
221 REM GOSUB 600
225 FOR I = TPS TO 1004-H - LOWER-300
231 X= INT(N * 0.5 * NM + 0.5)
232 Y=INT(N * 0.866 + 0.5) + I
233 CSET C,RD(W),GR(W),BL(W),255
234 LINE G-1,I+1,G+X,Y+1,C
235 LINE G-1,I+1,G-X,Y+1,C
238 LINE G-X,Y+1,G+X,Y+1,C
239 LINE G-1,I,G-X,Y,0
240 LINE G-1,I,G+X,Y,0
242 LINE G-1,I-1,G+X+1,Y-1,0
248 LINE G-1,I-1,G-X-1,Y-1,0
260 NEXT I
285 RETURN
300 TPS= INT(N * 0.866 + 0.5)
302 COUNTERT = COUNTERT + 1
305 FOR I = 0 TO TPS
310 LN = INT((TPS- I) * 0.5 * NM + 0.5)
311 CSET C1(W),RD(W),GR(W),BL(W),255
312 REM PRINT S5,LN,I
315 LINE G+ LN - 2, I+70,G- LN - 1 - 1, I+70, C1(W)
320 NEXT I
322 REM GOTO 322
323 V=1004-H-INT(.866*N+.5)-300
330 FOR I = TPS TO V
340 X = INT(N * 0.5 * NM + 0.5)
342 Y = INT(N * 0.866 + 0.5)
344 S5V3 = -1
345 CSET C1(W),RD(W),GR(W),BL(W),255
346 REM PRINT S5,X,Y,I
350 LINE G- X + S5V3, I,G+ 1, Y + I, C1(W)
355 LINE G+ X + S5V3, I,G- 1, Y + I, C1(W)
365 LINE G- X + S5V3, I,G+ X + 4, I,0
366 LINE G- X + S5V3 - 1, I,G+ X + 4, I, 0
367 LINE G- X + S5V3 - 1, I-1,G+ X + 4, I-1,0
370 LINE G+ X + S5V3, 0,G+ X + S5V3, I, 0
372 LINE G+ X + S5V3 + 1, 0,G+ X + S5V3 + 1, I, 0
387 NEXT I
397 RETURN
400 SP = 64
403 G=S5ART-88
405 FOR J = 1 TO NO
407 W = W + 1
408 G= G+88
420 GOSUB 200
430 NEXT J
435 W=W-NO
440 RETURN
450 G=S5ART-88
452 FOR J= 1 TO NO
455 W = W + 1
456 G=G+88
465 GOSUB 300
468 NEXT J
469 W=W-NO
470 RETURN
480 Z=Q/2-88
481 FOR J = 1 TO NO
482 W = W + 1
485 Z= Z+88
488 GOSUB 700
492 NEXT J
496 RETURN
500 N = N
501 SLEEP 200
510 GOTO 510
700 TPS= INT(N * 0.866 + 0.5)
705 FOR I = 0 TO TPS
710 L= INT(I * 0.5 * NM + 0.5)
713 C=C1(W)
714 CSET C,RD(W),GR(W),BL(W),255
715 LINE Z-L,I+70,Z+L,I+70,C
716 LINE Z-L,I+71,Z+L,I+71,C
717 LINE Z-L,I+69,Z+L,I+69,C
720 NEXT I
725 FOR I = TPS TO 1004-H - LOWER-300
731 X= INT(N * 0.5 * NM + 0.5)
732 Y=INT(N * 0.866 + 0.5) + I
733 CSET C,RD(W),GR(W),BL(W),255
734 LINE Z-1,I+1,Z+X,Y+1,C
735 LINE Z-1,I+2,Z+X,Y+2,C
736 LINE Z-1,I+1,Z-X,Y+1,C
737 LINE Z-1,I+2,Z-X,Y+2,C
738 LINE Z-X,Y+1,Z+X,Y+1,C
739 LINE Z-X,Y+2,Z+X,Y+2,C
740 LINE Z-1,I,Z+X,Y,0
741 LINE Z-1,I,Z-X,Y,0
742 LINE Z-1,I-1,Z+X+1,Y-1,0
743 LINE Z-1,I,Z+X,Y,0
745 LINE Z-1,I-1,Z+X+1,Y-1,0
748 LINE Z-1,I-1,Z-X-1,Y-1,0
750 NEXT I
760 RETURN
900 CN=15
901 DIM RD(200),GR(200),BL(200)
903 FOR I=1 TO 200
904 CN=CN+1:RED=RND(0)*255:GREEN=RND(0)*255:BLUE=RND(0)*255
905 RED=INT(RED):GREEN=INT(GREEN):BLUE=INT(BLUE)
906 CSET CN,RED,GREEN,BLUE,255
907 RD(I)=RED:GR(I)=GREEN:BL(I)=BLUE
910 REM PRINT CN,RED,GREEN,BLUE
914 C1(I)=CN
916 NEXT I920 RETURN


No comments:

Post a Comment