Enter 15 x,y coordinates, program then draws and rotates a 3D figure from those coordinates.
Appears on
Capital Area Timex Sinclair User Group’s Library Tape.
Source Code
1 REM @!▘ GO SUB VAL <> 10 LET l=1: BORDER 0: PAPER 0: INK 7: CLS 500 DIM X(16,8): DIM Y(16,8): DIM Z(16,8): LET SIN=SIN (PI/4): LET COS=COS (PI/4) 510 INPUT "X";X(l,l),"Y";Y(l,l): LET Z(l,l)=0 520 PLOT X(l,l)+128,Y(l,l)+30 540 FOR c=2 TO 16: INPUT "X";X(C,l): IF X(C,l)>255 THEN GO TO 590 541 INPUT ,"Y";Y(C,l): LET Z(C,l)=0 550 DRAW X(C,l)-X(C-l,l),Y(C,l)-Y(C-l,l) 560 PLOT X(C,l)+128,Y(C,l)+30: NEXT C 600 POKE 26715,33: POKE 26718,17 603 FOR Q=0 TO 4: POKE 26720,130+24*Q 610 FOR B=2 TO 8: FOR A=l TO C-l 620 LET X(A,B)=X(A,B-l)*COS-Z(A,B-l)*SIN: LET Z(A,B)=Z(A,B-l)*COS+X(A,B-l)*SIN: LET Y(A,B)=Y(A,B-l) 630 NEXT A: NEXT B: CLS 710 FOR B=l TO 7: FOR A=l TO C-2 720 PLOT 128+X(A,B),30+Y(A,B)-.5*Z(A,B) 730 DRAW (X(A,B+l))-(X(A,B)),(Y(A,B+l)-.5*Z(A,B+l))-(Y(A,B)-.5*Z(A,B)) 740 DRAW (X(A+l,B+l))-(X(A,B+l)),(Y(A+l,B+l)-.5*Z(A+l,B+l))-(Y(A,B+l)-.5*Z(A,B+l)): NEXT A: NEXT B 810 FOR A=l TO C-2: PLOT 128+X(A,B),30+Y(A,B)-.5*Z(A,B) 820 DRAW (X(A,l))-(X(A,B)),(Y(A,l)-.5*Z(A,l))-(Y(A,B)-.5*Z(A,B)) 830 DRAW (X(A+l,l))-(X(A,l)),(Y(A+l,l)-.5*Z(A+l,l))-(Y(A,l)-.5*Z(A,l)) 850 NEXT A: RANDOMIZE USR 26715 910 FOR A=l TO C-l: LET XN=X(A,l)*COS (PI/20)-Z(A,l)*SIN (PI/20) 920 LET ZN=Z(A,l)*COS (PI/20)+X(A,l)*SIN (PI/20) 930 LET X(A,l)=XN: LET Z(A,l)=ZN: NEXT A: NEXT Q 1000 POKE 26715,17: POKE 26718,33: BEEP .2,30 1020 FOR Q=0 TO 4: POKE 26720,130+24*Q 1030 RANDOMIZE USR 26715: PAUSE 5: NEXT Q: IF INKEY$="" THEN GO TO 1010 1040 RUN 9998 SAVE "Goblet" LINE 1 9999 VERIFY ""