Another shared program from Richard Duncan - works for iPad in Portrait.
10 EV=722
20 DIM C1(EV),CC(EV),P(60),W(60),B(EV)
30 DIM ZV(EV),ODER(EV),F(EV),S(EV)
40 DIM RD(200),GR(200),BL(200)
50 ANG=0
60 NN=720
70 SCREEN 1:CLS
80 N=0
90 FOR I=1 TO NN
100 ODER(I)=I
110 NEXT I
120 SR= 80:R=220
130 J=0
140 T7=0
150 J=0
160 GOSUB 2320
170 ANG=ANG+1
180 M1 = 300
190 M2= -24
200 M3 = -44
210 XD= 12*3.14159 / 180
220 YD= 0*3.14159 / 180
230 ZD= 0*3.14159 / 180
240 GOSUB 340
250 REM GOTO 940
260 M1 = 100
270 M2= 0
280 M3 = 0
290 XD= -90*3.14159 / 180
300 YD= 0*3.14159 / 180
310 ZD= 0*3.14159 / 180
320 GOSUB 340
330 GOTO 940
340 J=0
350 FOR A = 0 TO 348 STEP 12
360 A2 = A + 12
370 A1 = A
380 A1 = A1 * 3.14159 / 180
390 A2 = A2 * 3.14159 / 180
400 J=J+1
410 FOR AA = 0 TO 330 STEP 30
420 T7=T7+1
430 A3 = AA
440 A4 = AA + 30
450 A3 = A3 * 3.14159 / 180
460 A4 = A4 * 3.14159 / 180
470 X = R * COS(A1) + COS(A1) * SR * COS(A3)+M1
480 Z= R * SIN(A1) + SIN(A1) * SR * COS(A3)+M3
490 Y = SR * SIN(A3)+M2
500 GOSUB 1900
510 X1 = X: Y1 = Y: Z1 = Z
520 X = R * COS(A1) + COS(A1) * SR * COS(A4)+M1
530 Z= R * SIN(A1) + SIN(A1) * SR * COS(A4)+M3
540 Y = SR * SIN(A4)+M2
550 GOSUB 1900
560 X2 = X: Y2 = Y: Z2 = Z
570 X = R * COS(A2) + COS(A2) * SR* COS(A4)+M1
580 Z= R * SIN(A2) + SIN(A2) * SR* COS(A4)+M3
590 Y = SR* SIN(A4)+M2
600 GOSUB 1900
610 X3 = X: Y3 = Y: Z3 = Z
620 X = R * COS(A2) + COS(A2) * SR* COS(A3)+M1
630 Z= R * SIN(A2) + SIN(A2) * SR* COS(A3)+M3
640 Y = SR* SIN(A3)+M2
650 GOSUB 1900
660 N=N+1
670 X4 = X: Y4 = Y: Z4 = Z
680 MX=X1:IF MX>X2 THEN MX=X2:IF MX>X3 THEN MX=X3
690 IF MX>X4 THEN MX=X4
700 MZ=Z1:IF MZ>Z2 THEN MZ=Z2:IF MZ>Z3 THEN MZ=Z3
710 IF MZ>Z4 THEN MZ=Z4
720 MY=Y1:IF MY>Y2 THEN MY=Y2:IF MY>Y3 THEN MY=Y3
730 IF MY>Y4 THEN MY=Y4
740 AX=X1:IF AX<X2 THEN AX=X2:IF AX<X3 THEN AX=X3
750 IF AX<X4 THEN AX=X4
760 AY=Y1:IF AY<Y2 THEN AY=Y2:IF AY<Y3 THEN AY=Y3
770 IF AY<Y4 THEN AY=Y4
780 IF T7=1 THEN SX=MX:IF T7=1 THEN SY=MY
790 IF T7=1 THEN LX=AX:IF T7=1 THEN LY=AY
800 IF T7>1 AND SX>MX THEN SX=MX
810 IF T7>1 AND SY>MY THEN SY=MY
820 IF T7>1 AND LX<AX THEN LX=AX
830 IF T7>1 AND LY<AY THEN LY=AY
840 ZV(N)=(Z1+Z2+Z3+Z4)*250
850 REM ZV(N)=MZ*500
860 F(N)=A
870 S(N)=AA
880 CC(N)=J
890 IF XD>0 THEN B(N)=1
900 IF XD<0 THEN B(N)=2
910 NEXT AA
920 NEXT A
930 RETURN
940 REM PRINT SX;LX;SY;LY
950 GOSUB 2530
960 REM END
970 FOR KK=1 TO NN
980 V=ODER(KK)
990 V1=F(V)
1000 V2=S(V)
1010 J=V
1020 IF B(V)=2 THEN 1090
1030 M1 = 300
1040 M2= -24
1050 M3 = -44
1060 XD= 12*3.14159 / 180
1070 YD= 0* 3.14159 / 180
1080 ZD= 0*3.14159 / 180:GOTO 1150
1090 M1 = 100
1100 M2= 0
1110 M3 = 0
1120 XD= -90*3.14159 / 180
1130 YD= 0* 3.14159 / 180
1140 ZD= 0* 3.14159 / 180
1150 FOR A = V1 TO V1
1160 A2 = A + 12
1170 A1 = A
1180 A1 = A1 * 3.14159 / 180
1190 A2 = A2 * 3.14159 / 180
1200 FOR AA = V2 TO V2
1210 A3 = AA
1220 A4=AA+30
1230 REM PRINT "aa=";AA
1240 REM PRINT "a3=";A3
1250 A3 = A3 * 3.14159 / 180
1260 A4 = A4 * 3.14159 / 180
1270 X = R * COS(A1) + COS(A1) * SR * COS(A3)+M1
1280 Z= R * SIN(A1) + SIN(A1) * SR * COS(A3)+M3
1290 Y = SR * SIN(A3)+M2
1300 REM PRINT "x=";X;A1;A3
1310 GOSUB 1900
1320 X1 = X
1330 Y1=Y
1340 Z1=Z
1350 X = R * COS(A1) + COS(A1) * SR * COS(A4)+M1
1360 Z= R * SIN(A1) + SIN(A1) * SR * COS(A4)+M3
1370 Y = SR * SIN(A4)+M2
1380 GOSUB 1900
1390 X2 = X
1400 Y2=Y
1410 Z2=Z
1420 X = R * COS(A2) + COS(A2) * SR * COS(A4)+M1
1430 Z= R * SIN(A2) + SIN(A2) * SR * COS(A4)+M3
1440 Y = SR* SIN(A4)+M2
1450 GOSUB 1900
1460 X3 = X
1470 Y3=Y
1480 Z3=Z
1490 X = R * COS(A2) + COS(A2) * SR* COS(A3)+M1
1500 Z= R * SIN(A2) + SIN(A2) * SR* COS(A3)+M3
1510 Y = SR* SIN(A3)+M2
1520 GOSUB 1900
1530 X4 = X
1540 Y4=Y
1550 Z4=Z
1560 DX1=ABS(LX-SX)
1570 DY1=ABS(LY-SY)
1580 REM PRINT "dx=";DX;"dy=";DY
1590 REM PRINT "x1before=";X1
1600 YT=900
1610 DF=34
1620 DX=700/DX1
1630 DY=700/DY1
1640 X1=ABS(X1-SX)*DX+DF
1650 X2=ABS(X2-SX)*DX+DF
1660 X3=ABS(X3-SX)*DX+DF
1670 X4=ABS(X4-SX)*DX+DF
1680 Y1=YT-ABS(Y1-SY)*DY
1690 Y2=YT-ABS(Y2-SY)*DY
1700 Y3=YT-ABS(Y3-SY)*DY
1710 Y4=YT-ABS(Y4-SY)*DY
1720 REM PRINT X1;Y1;X2;Y2
1730 REM PRINT X3;Y3;X4;Y4
1740 TRIANGLE X1,Y1,X2,Y2,X3,Y3,C1(J),1
1750 TRIANGLE X1,Y1,X4,Y4,X3,Y3,C1(J),1
1760 LINE X1,Y1,X3,Y3,C1(J)
1770 LINE X1,Y1,X4,Y4,C1(J)
1780 LINE X1,Y1,X2,Y2,C1(J)
1790 LINE X2,Y2,X3,Y3,C1(J)
1800 LINE X3,Y3,X4,Y4,C1(J)
1810 LINE X1,Y1,X2,Y2,4
1820 LINE X2,Y2,X3,Y3,4
1830 LINE X3,Y3,X4,Y4,4
1840 LINE X1,Y1,X4,Y4,4
1850 NEXT AA
1860 NEXT A
1870 NEXT KK
1880 SLEEP 5000
1890 GOTO 70
1900 XN = X * COS(YD)+ Z * SIN(YD)
1910 ZN = -X * SIN(YD) + Z * COS(YD)
1920 X = XN
1930 Z = ZN
1940 YN = -Z * SIN(XD) + Y * COS(XD)
1950 ZN = Z * COS(XD) + Y * SIN(XD)
1960 Y = YN
1970 Z = ZN
1980 XN = X * COS(ZD) + Y * SIN(ZD)
1990 YN = -X * SIN(ZD)+ Y * COS(ZD)
2000 X = XN
2010 Y = YN
2020 XR=-21+ANG
2030 YR=ANG
2040 ZR=-23+ANG
2050 REM XR=0:YR=0:ZR=0
2060 REM XR=XR*3.14159/180
2070 REM YR=YR*3.14159/180
2080 REM ZR=ZR*3.14159/180
2090 XN = X * COS(YR)+ Z * SIN(YR)
2100 ZN = -X * SIN(YR) + Z * COS(YR)
2110 X = XN
2120 Z = ZN
2130 YN = -Z * SIN(XR) + Y * COS(XR)
2140 ZN = Z * COS(XR)+ Y * SIN(XR)
2150 Y = YN
2160 Z = ZN
2170 XN = X * COS(ZR)+ Y * SIN(ZR)
2180 YN = -X * SIN(ZR)+ Y * COS(ZR)
2190 X = XN
2200 Y = YN
2210 RETURN
2220 CN=15
2230 FOR I=1 TO 200
2240 CN=CN+1:RED=RND(0)*255:GREEN=RND(0)*255:BLUE=RND(0)*255
2250 RED=INT(RED):GREEN=INT(GREEN):BLUE=INT(BLUE)
2260 CSET CN,RED,GREEN,BLUE,255
2270 RD(I)=RED:GR(I)=GREEN:BL(I)=BLUE
2280 REM PRINT CN,RED,GREEN,BLUE
2290 C1(I)=CN
2300 NEXT I
2310 RETURN
2320 U=0
2330 T3=0
2340 FOR K=1 TO 2
2350 FOR I=1 TO 30
2360 T3=T3+1
2370 IF T3=1 THEN C2=0
2380 IF T3=2 THEN C2=1
2390 IF T3=2 THEN T3=0
2400 C3=C2
2410 FOR J=1 TO 12
2420 U=U+1
2430 C3=C3+1
2440 IF C3=1 THEN C1(U)=5
2450 IF C3=1 AND K=2 THEN C1(U)=2
2460 IF C3=2 THEN C1(U)=6
2470 IF C3=2 AND K=2 THEN C1(U)=3
2480 IF C3=2 THEN C3=0
2490 NEXT J
2500 NEXT I
2510 NEXT K
2520 RETURN
2530 N=NN
2540 K=1
2550 P(K) = 1
2560 W(K) = 1
2570 L = 1
2580 RR= N
2590 IF (RR- L) < 9 THEN 2610
2600 GOTO 2810
2610 IF (RR- L + 1) = 1 THEN 2630
2620 GOTO 2680
2630 L = P(K)
2640 RR= W(K)
2650 K = K - 1
2660 IF K = 0 THEN 3170
2670 GOTO 2590
2680 FOR I = L + 1 TO RR
2690 FOR J = L TO I - 1
2700 M = I - J + L - 1
2710 IF ZV(M) <= ZV(M + 1) THEN 2790
2720 T = ZV(M)
2730 ZV(M) = ZV(M + 1)
2740 T1 = ODER(M)
2750 ODER(M) = ODER(M + 1)
2760 ODER(M + 1) = T1
2770 ZV(M + 1) = T
2780 NEXT J
2790 NEXT I
2800 GOTO 2630
2810 I = L
2820 J = RR
2830 IF ZV(I) > ZV(J) THEN 2850
2840 GOTO 3020
2850 T = ZV(J)
2860 ZV(J) = ZV(I)
2870 T1 = ODER(J)
2880 ODER(J) = ODER(I)
2890 ODER(I) = T1
2900 ZV(I) = T
2910 I = I + 1
2920 IF J > I THEN 2940
2930 GOTO 3050
2940 IF ZV(J) < ZV(I) THEN 2960
2950 GOTO 2910
2960 T = ZV(J)
2970 ZV(J) = ZV(I)
2980 T1 = ODER(J)
2990 ODER(J) = ODER(I)
3000 ODER(I) = T1
3010 ZV(I) = T
3020 J = J - 1
3030 IF J > I THEN 2830
3040 GOTO 3050
3050 J = J + 1
3060 K=K+1
3070 IF (I - L) < (RR- J) THEN 3090
3080 GOTO 3130
3090 P(K) = J
3100 W(K) = RR
3110 RR= I
3120 GOTO 2590
3130 P(K) = L
3140 W(K) = I
3150 L=J
3160 GOTO 2590
3170 RETURN
20 DIM C1(EV),CC(EV),P(60),W(60),B(EV)
30 DIM ZV(EV),ODER(EV),F(EV),S(EV)
40 DIM RD(200),GR(200),BL(200)
50 ANG=0
60 NN=720
70 SCREEN 1:CLS
80 N=0
90 FOR I=1 TO NN
100 ODER(I)=I
110 NEXT I
120 SR= 80:R=220
130 J=0
140 T7=0
150 J=0
160 GOSUB 2320
170 ANG=ANG+1
180 M1 = 300
190 M2= -24
200 M3 = -44
210 XD= 12*3.14159 / 180
220 YD= 0*3.14159 / 180
230 ZD= 0*3.14159 / 180
240 GOSUB 340
250 REM GOTO 940
260 M1 = 100
270 M2= 0
280 M3 = 0
290 XD= -90*3.14159 / 180
300 YD= 0*3.14159 / 180
310 ZD= 0*3.14159 / 180
320 GOSUB 340
330 GOTO 940
340 J=0
350 FOR A = 0 TO 348 STEP 12
360 A2 = A + 12
370 A1 = A
380 A1 = A1 * 3.14159 / 180
390 A2 = A2 * 3.14159 / 180
400 J=J+1
410 FOR AA = 0 TO 330 STEP 30
420 T7=T7+1
430 A3 = AA
440 A4 = AA + 30
450 A3 = A3 * 3.14159 / 180
460 A4 = A4 * 3.14159 / 180
470 X = R * COS(A1) + COS(A1) * SR * COS(A3)+M1
480 Z= R * SIN(A1) + SIN(A1) * SR * COS(A3)+M3
490 Y = SR * SIN(A3)+M2
500 GOSUB 1900
510 X1 = X: Y1 = Y: Z1 = Z
520 X = R * COS(A1) + COS(A1) * SR * COS(A4)+M1
530 Z= R * SIN(A1) + SIN(A1) * SR * COS(A4)+M3
540 Y = SR * SIN(A4)+M2
550 GOSUB 1900
560 X2 = X: Y2 = Y: Z2 = Z
570 X = R * COS(A2) + COS(A2) * SR* COS(A4)+M1
580 Z= R * SIN(A2) + SIN(A2) * SR* COS(A4)+M3
590 Y = SR* SIN(A4)+M2
600 GOSUB 1900
610 X3 = X: Y3 = Y: Z3 = Z
620 X = R * COS(A2) + COS(A2) * SR* COS(A3)+M1
630 Z= R * SIN(A2) + SIN(A2) * SR* COS(A3)+M3
640 Y = SR* SIN(A3)+M2
650 GOSUB 1900
660 N=N+1
670 X4 = X: Y4 = Y: Z4 = Z
680 MX=X1:IF MX>X2 THEN MX=X2:IF MX>X3 THEN MX=X3
690 IF MX>X4 THEN MX=X4
700 MZ=Z1:IF MZ>Z2 THEN MZ=Z2:IF MZ>Z3 THEN MZ=Z3
710 IF MZ>Z4 THEN MZ=Z4
720 MY=Y1:IF MY>Y2 THEN MY=Y2:IF MY>Y3 THEN MY=Y3
730 IF MY>Y4 THEN MY=Y4
740 AX=X1:IF AX<X2 THEN AX=X2:IF AX<X3 THEN AX=X3
750 IF AX<X4 THEN AX=X4
760 AY=Y1:IF AY<Y2 THEN AY=Y2:IF AY<Y3 THEN AY=Y3
770 IF AY<Y4 THEN AY=Y4
780 IF T7=1 THEN SX=MX:IF T7=1 THEN SY=MY
790 IF T7=1 THEN LX=AX:IF T7=1 THEN LY=AY
800 IF T7>1 AND SX>MX THEN SX=MX
810 IF T7>1 AND SY>MY THEN SY=MY
820 IF T7>1 AND LX<AX THEN LX=AX
830 IF T7>1 AND LY<AY THEN LY=AY
840 ZV(N)=(Z1+Z2+Z3+Z4)*250
850 REM ZV(N)=MZ*500
860 F(N)=A
870 S(N)=AA
880 CC(N)=J
890 IF XD>0 THEN B(N)=1
900 IF XD<0 THEN B(N)=2
910 NEXT AA
920 NEXT A
930 RETURN
940 REM PRINT SX;LX;SY;LY
950 GOSUB 2530
960 REM END
970 FOR KK=1 TO NN
980 V=ODER(KK)
990 V1=F(V)
1000 V2=S(V)
1010 J=V
1020 IF B(V)=2 THEN 1090
1030 M1 = 300
1040 M2= -24
1050 M3 = -44
1060 XD= 12*3.14159 / 180
1070 YD= 0* 3.14159 / 180
1080 ZD= 0*3.14159 / 180:GOTO 1150
1090 M1 = 100
1100 M2= 0
1110 M3 = 0
1120 XD= -90*3.14159 / 180
1130 YD= 0* 3.14159 / 180
1140 ZD= 0* 3.14159 / 180
1150 FOR A = V1 TO V1
1160 A2 = A + 12
1170 A1 = A
1180 A1 = A1 * 3.14159 / 180
1190 A2 = A2 * 3.14159 / 180
1200 FOR AA = V2 TO V2
1210 A3 = AA
1220 A4=AA+30
1230 REM PRINT "aa=";AA
1240 REM PRINT "a3=";A3
1250 A3 = A3 * 3.14159 / 180
1260 A4 = A4 * 3.14159 / 180
1270 X = R * COS(A1) + COS(A1) * SR * COS(A3)+M1
1280 Z= R * SIN(A1) + SIN(A1) * SR * COS(A3)+M3
1290 Y = SR * SIN(A3)+M2
1300 REM PRINT "x=";X;A1;A3
1310 GOSUB 1900
1320 X1 = X
1330 Y1=Y
1340 Z1=Z
1350 X = R * COS(A1) + COS(A1) * SR * COS(A4)+M1
1360 Z= R * SIN(A1) + SIN(A1) * SR * COS(A4)+M3
1370 Y = SR * SIN(A4)+M2
1380 GOSUB 1900
1390 X2 = X
1400 Y2=Y
1410 Z2=Z
1420 X = R * COS(A2) + COS(A2) * SR * COS(A4)+M1
1430 Z= R * SIN(A2) + SIN(A2) * SR * COS(A4)+M3
1440 Y = SR* SIN(A4)+M2
1450 GOSUB 1900
1460 X3 = X
1470 Y3=Y
1480 Z3=Z
1490 X = R * COS(A2) + COS(A2) * SR* COS(A3)+M1
1500 Z= R * SIN(A2) + SIN(A2) * SR* COS(A3)+M3
1510 Y = SR* SIN(A3)+M2
1520 GOSUB 1900
1530 X4 = X
1540 Y4=Y
1550 Z4=Z
1560 DX1=ABS(LX-SX)
1570 DY1=ABS(LY-SY)
1580 REM PRINT "dx=";DX;"dy=";DY
1590 REM PRINT "x1before=";X1
1600 YT=900
1610 DF=34
1620 DX=700/DX1
1630 DY=700/DY1
1640 X1=ABS(X1-SX)*DX+DF
1650 X2=ABS(X2-SX)*DX+DF
1660 X3=ABS(X3-SX)*DX+DF
1670 X4=ABS(X4-SX)*DX+DF
1680 Y1=YT-ABS(Y1-SY)*DY
1690 Y2=YT-ABS(Y2-SY)*DY
1700 Y3=YT-ABS(Y3-SY)*DY
1710 Y4=YT-ABS(Y4-SY)*DY
1720 REM PRINT X1;Y1;X2;Y2
1730 REM PRINT X3;Y3;X4;Y4
1740 TRIANGLE X1,Y1,X2,Y2,X3,Y3,C1(J),1
1750 TRIANGLE X1,Y1,X4,Y4,X3,Y3,C1(J),1
1760 LINE X1,Y1,X3,Y3,C1(J)
1770 LINE X1,Y1,X4,Y4,C1(J)
1780 LINE X1,Y1,X2,Y2,C1(J)
1790 LINE X2,Y2,X3,Y3,C1(J)
1800 LINE X3,Y3,X4,Y4,C1(J)
1810 LINE X1,Y1,X2,Y2,4
1820 LINE X2,Y2,X3,Y3,4
1830 LINE X3,Y3,X4,Y4,4
1840 LINE X1,Y1,X4,Y4,4
1850 NEXT AA
1860 NEXT A
1870 NEXT KK
1880 SLEEP 5000
1890 GOTO 70
1900 XN = X * COS(YD)+ Z * SIN(YD)
1910 ZN = -X * SIN(YD) + Z * COS(YD)
1920 X = XN
1930 Z = ZN
1940 YN = -Z * SIN(XD) + Y * COS(XD)
1950 ZN = Z * COS(XD) + Y * SIN(XD)
1960 Y = YN
1970 Z = ZN
1980 XN = X * COS(ZD) + Y * SIN(ZD)
1990 YN = -X * SIN(ZD)+ Y * COS(ZD)
2000 X = XN
2010 Y = YN
2020 XR=-21+ANG
2030 YR=ANG
2040 ZR=-23+ANG
2050 REM XR=0:YR=0:ZR=0
2060 REM XR=XR*3.14159/180
2070 REM YR=YR*3.14159/180
2080 REM ZR=ZR*3.14159/180
2090 XN = X * COS(YR)+ Z * SIN(YR)
2100 ZN = -X * SIN(YR) + Z * COS(YR)
2110 X = XN
2120 Z = ZN
2130 YN = -Z * SIN(XR) + Y * COS(XR)
2140 ZN = Z * COS(XR)+ Y * SIN(XR)
2150 Y = YN
2160 Z = ZN
2170 XN = X * COS(ZR)+ Y * SIN(ZR)
2180 YN = -X * SIN(ZR)+ Y * COS(ZR)
2190 X = XN
2200 Y = YN
2210 RETURN
2220 CN=15
2230 FOR I=1 TO 200
2240 CN=CN+1:RED=RND(0)*255:GREEN=RND(0)*255:BLUE=RND(0)*255
2250 RED=INT(RED):GREEN=INT(GREEN):BLUE=INT(BLUE)
2260 CSET CN,RED,GREEN,BLUE,255
2270 RD(I)=RED:GR(I)=GREEN:BL(I)=BLUE
2280 REM PRINT CN,RED,GREEN,BLUE
2290 C1(I)=CN
2300 NEXT I
2310 RETURN
2320 U=0
2330 T3=0
2340 FOR K=1 TO 2
2350 FOR I=1 TO 30
2360 T3=T3+1
2370 IF T3=1 THEN C2=0
2380 IF T3=2 THEN C2=1
2390 IF T3=2 THEN T3=0
2400 C3=C2
2410 FOR J=1 TO 12
2420 U=U+1
2430 C3=C3+1
2440 IF C3=1 THEN C1(U)=5
2450 IF C3=1 AND K=2 THEN C1(U)=2
2460 IF C3=2 THEN C1(U)=6
2470 IF C3=2 AND K=2 THEN C1(U)=3
2480 IF C3=2 THEN C3=0
2490 NEXT J
2500 NEXT I
2510 NEXT K
2520 RETURN
2530 N=NN
2540 K=1
2550 P(K) = 1
2560 W(K) = 1
2570 L = 1
2580 RR= N
2590 IF (RR- L) < 9 THEN 2610
2600 GOTO 2810
2610 IF (RR- L + 1) = 1 THEN 2630
2620 GOTO 2680
2630 L = P(K)
2640 RR= W(K)
2650 K = K - 1
2660 IF K = 0 THEN 3170
2670 GOTO 2590
2680 FOR I = L + 1 TO RR
2690 FOR J = L TO I - 1
2700 M = I - J + L - 1
2710 IF ZV(M) <= ZV(M + 1) THEN 2790
2720 T = ZV(M)
2730 ZV(M) = ZV(M + 1)
2740 T1 = ODER(M)
2750 ODER(M) = ODER(M + 1)
2760 ODER(M + 1) = T1
2770 ZV(M + 1) = T
2780 NEXT J
2790 NEXT I
2800 GOTO 2630
2810 I = L
2820 J = RR
2830 IF ZV(I) > ZV(J) THEN 2850
2840 GOTO 3020
2850 T = ZV(J)
2860 ZV(J) = ZV(I)
2870 T1 = ODER(J)
2880 ODER(J) = ODER(I)
2890 ODER(I) = T1
2900 ZV(I) = T
2910 I = I + 1
2920 IF J > I THEN 2940
2930 GOTO 3050
2940 IF ZV(J) < ZV(I) THEN 2960
2950 GOTO 2910
2960 T = ZV(J)
2970 ZV(J) = ZV(I)
2980 T1 = ODER(J)
2990 ODER(J) = ODER(I)
3000 ODER(I) = T1
3010 ZV(I) = T
3020 J = J - 1
3030 IF J > I THEN 2830
3040 GOTO 3050
3050 J = J + 1
3060 K=K+1
3070 IF (I - L) < (RR- J) THEN 3090
3080 GOTO 3130
3090 P(K) = J
3100 W(K) = RR
3110 RR= I
3120 GOTO 2590
3130 P(K) = L
3140 W(K) = I
3150 L=J
3160 GOTO 2590
3170 RETURN
This really shows the graphics power of HandBasic.
ReplyDelete