Home » Personal collection » Commodore disks » disk50a2_progs1.d64 » 3d rotation

3d rotation

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Commodore disks » disk50a2_progs1.d64
Filename: 3d rotation
Read OK:
File size: 04B6 bytes
Load address: 0801
Exec address: 0000
File contents
    40 S=16:B=3:C=8:SM=1024:DI=5000
    45 POKE53272,(PEEK(53272) AND 15) OR S
    50 POKE56578,PEEK(56578) OR 3
    55 POKE56576,(PEEK(56576) AND 252) ORB
    60 BT=C*1024:H=INT(BT/256):L=BT-256*H
    65 POKE51,L:POKE52,H
    70 POKE55,L:POKE56,H
    75 POKE53272,(PEEK(53272) AND 241) ORC
    80 POKE53265,PEEK(53265) OR 32
    85 FOR J=SM TO SM+999
    90 POKEJ,1
    95 NEXT
   100 FOR J=BT TO BT+7999
   105 POKE J,0
   110 NEXT
   115 DIMP(50,4):READN:FORD=0TON-1:READP(D,0),P(D,1),P(D,2)
   120 P(D,3)=150-(P(D,0)*2500/(DI-P(D,2)))/6
   122 P(D,4)=100-(P(D,1)*2500/(DI-P(D,2)))/6:NEXT
   125 READN:IFN<>-1 THEN PRINT"INCORRECT NO OF POINTS":GOTO180
   130 READN:FORD=0TON-1:READPA,PB:X1=P(PA-1,3):X2=P(PB-1,3):Y1=P(PA-1,4)
   140 Y2=P(PB-1,4):GOSUB1020:NEXT
   150 GOTO150
   175 GETK$:IFK$<>" "THEN175
   180 POKE53265,PEEK(53265) AND 223
   185 POKE53272,(PEEK(53272) AND 240) OR4
   190 STOP
  1000 BYTE=BT+7687-320*INT(Y/8)-(YAND7)+INT(X/8)*8
  1005 BIT=7-(XAND7)
  1010 POKE BYTE,PEEK(BYTE) OR 2^BIT
  1015 RETURN
  1020 IF X1<>X2 THEN M=(Y2-Y1)/(X2-X1):C=Y1-M*X1
  1030 IF ABS(X2-X1)<ABS(Y2-Y1)THEN1100
  1040 IF X1=X2 THEN RETURN
  1050 FORX=X1 TO X2 STEP 2*SGN(X2-X1)
  1060 Y=M*X+C
  1070 GOSUB1000
  1080 NEXT:X1=X2:Y1=Y2
  1090 RETURN
  1100 FORY=Y1 TO Y2 STEP SGN(Y2-Y1)
  1110 X=X1:IF X1<>X2 THEN X=(Y-C)/M
  1120 GOSUB1000
  1130 NEXT:X1=X2:Y1=Y2
  1140 RETURN
  1150 DATA 8,-500,500,500,500,500,500,500,-500,500,-500,-500,500
  1160 DATA -500,500,-500,500,500,-500,500,-500,-500,-500,-500,-500,-1
  1170 DATA 12,1,2,2,3,3,4,4,1,1,5,2,6,3,7,4,8,5,6,6,7,7,8,8,5

"(S�16:B�3:C�8:SM�1024:DI�5000A-�53272,(�(53272) � 15) � SY2�56578,�(56578) � 3x7�56576,(�(56576) � 252) �B�<BT�C�1024:H��(BT�256):L�BT�256�H�A�51,L:�52,H�F�55,L:�56,H�K�53272,(�(53272) � 241) �C�P�53265,�(53265) � 32		U� J�SM � SM�999	Z�J,1	_�-	d� J�BT � BT�79997	i� J,0=	n�l	s�P(50,4):�N:�D�0�N�1:�P(D,0),P(D,1),P(D,2)�	xP(D,3)�150�(P(D,0)�2500�(DI�P(D,2)))�6�	zP(D,4)�100�(P(D,1)�2500�(DI�P(D,2)))�6:��	}�N:�N���1 � �"INCORRECT NO OF POINTS":�1801
��N:�D�0�N�1:�PA,PB:X1�P(PA�1,3):X2�P(PB�1,3):Y1�P(PA�1,4)J
�Y2�P(PB�1,4):�1020:�S
��150h
��K$:�K$��" "�175�
��53265,�(53265) � 223�
��53272,(�(53272) � 240) �4�
���
�BYTE�BT�7687�320��(Y�8)�(Y�7)��(X�8)�8�
�BIT�7�(X�7)�
�� BYTE,�(BYTE) � 2�BIT��.�� X1��X2 � M�(Y2�Y1)�(X2�X1):C�Y1�M�X1K� �(X2�X1)��(Y2�Y1)�1100[� X1�X2 � �w�X�X1 � X2 � 2��(X2�X1)�$Y�M�X�C�.�1000�8�:X1�X2:Y1�Y2�B��L�Y�Y1 � Y2 � �(Y2�Y1)�VX�X1:� X1��X2 � X�(Y�C)�M�`�1000�j�:X1�X2:Y1�Y2�t�;~� 8,-500,500,500,500,500,500,500,-500,500,-500,-500,500|�� -500,500,-500,500,500,-500,500,-500,-500,-500,-500,-500,-1��� 12,1,2,2,3,3,4,4,1,1,5,2,6,3,7,4,8,5,6,6,7,7,8,8,5
"H(@s.16:b.3:c.8:sm.1024:di.5000@aH-@.53272,(.(53272) . 15) . s@yH2@.56578,.(56578) . 3@XH7@.56576,(.(56576) . 252) .b@.H<@bt.c.1024:h..(bt.256):l.bt.256.h@.Ha@.51,l:.52,h@.Hf@.55,l:.56,h@.Hk@.53272,(.(53272) . 241) .c@.Hp@.53265,.(53265) . 32@IIu@. j.sm . sm.999@RIz@.j,1@XI.@.@-ID@. j.bt . bt.7999@7II@. j,0@=IN@.@LIS@.p(50,4):.n:.d.0.n.1:.p(d,0),p(d,1),p(d,2)@.IX@p(d,3).150.(p(d,0).2500.(di.p(d,2))).6@.IZ@p(d,4).100.(p(d,1).2500.(di.p(d,2))).6:.@.I.@.n:.n...1 . ."incorrect no of points":.180@1J.@.n:.d.0.n.1:.pa,pb:x1.p(pa.1,3):x2.p(pb.1,3):y1.p(pa.1,4)@jJ.@y2.p(pb.1,4):.1020:.@sJ.@.150@HJ.@.k$:.k$.." ".175@.J.@.53265,.(53265) . 223@.J.@.53272,(.(53272) . 240) .4@.J.@.@.J.Cbyte.bt.7687.320..(y.8).(y.7)..(x.8).8@.J.Cbit.7.(x.7)@.J.C. byte,.(byte) . 2.bit@CK.C.@.K.C. x1..x2 . m.(y2.y1).(x2.x1):c.y1.m.x1@kKFD. .(x2.x1)..(y2.y1).1100@[KPD. x1.x2 . .@WKZD.x.x1 . x2 . 2..(x2.x1)@.K$Dy.m.x.c@.K.D.1000@.K8D.:x1.x2:y1.y2@.KbD.@.KlD.y.y1 . y2 . .(y2.y1)@.KvDx.x1:. x1..x2 . x.(y.c).m@.K.D.1000@.KJD.:x1.x2:y1.y2@.KTD.@;L.D. 8,-500,500,500,500,500,500,500,-500,500,-500,-500,500@.L.D. -500,500,-500,500,500,-500,500,-500,-500,-500,-500,-500,-1@.L.D. 12,1,2,2,3,3,4,4,1,1,5,2,6,3,7,4,8,5,6,6,7,7,8,8,5@@@
00000000  22 08 28 00 53 b2 31 36  3a 42 b2 33 3a 43 b2 38  |".(.S.16:B.3:C.8|
00000010  3a 53 4d b2 31 30 32 34  3a 44 49 b2 35 30 30 30  |:SM.1024:DI.5000|
00000020  00 41 08 2d 00 97 35 33  32 37 32 2c 28 c2 28 35  |.A.-..53272,(.(5|
00000030  33 32 37 32 29 20 af 20  31 35 29 20 b0 20 53 00  |3272) . 15) . S.|
00000040  59 08 32 00 97 35 36 35  37 38 2c c2 28 35 36 35  |Y.2..56578,.(565|
00000050  37 38 29 20 b0 20 33 00  78 08 37 00 97 35 36 35  |78) . 3.x.7..565|
00000060  37 36 2c 28 c2 28 35 36  35 37 36 29 20 af 20 32  |76,(.(56576) . 2|
00000070  35 32 29 20 b0 42 00 9d  08 3c 00 42 54 b2 43 ac  |52) .B...<.BT.C.|
00000080  31 30 32 34 3a 48 b2 b5  28 42 54 ad 32 35 36 29  |1024:H..(BT.256)|
00000090  3a 4c b2 42 54 ab 32 35  36 ac 48 00 ad 08 41 00  |:L.BT.256.H...A.|
000000a0  97 35 31 2c 4c 3a 97 35  32 2c 48 00 bd 08 46 00  |.51,L:.52,H...F.|
000000b0  97 35 35 2c 4c 3a 97 35  36 2c 48 00 dc 08 4b 00  |.55,L:.56,H...K.|
000000c0  97 35 33 32 37 32 2c 28  c2 28 35 33 32 37 32 29  |.53272,(.(53272)|
000000d0  20 af 20 32 34 31 29 20  b0 43 00 f5 08 50 00 97  | . 241) .C...P..|
000000e0  35 33 32 36 35 2c c2 28  35 33 32 36 35 29 20 b0  |53265,.(53265) .|
000000f0  20 33 32 00 09 09 55 00  81 20 4a b2 53 4d 20 a4  | 32...U.. J.SM .|
00000100  20 53 4d aa 39 39 39 00  12 09 5a 00 97 4a 2c 31  | SM.999...Z..J,1|
00000110  00 18 09 5f 00 82 00 2d  09 64 00 81 20 4a b2 42  |..._...-.d.. J.B|
00000120  54 20 a4 20 42 54 aa 37  39 39 39 00 37 09 69 00  |T . BT.7999.7.i.|
00000130  97 20 4a 2c 30 00 3d 09  6e 00 82 00 6c 09 73 00  |. J,0.=.n...l.s.|
00000140  86 50 28 35 30 2c 34 29  3a 87 4e 3a 81 44 b2 30  |.P(50,4):.N:.D.0|
00000150  a4 4e ab 31 3a 87 50 28  44 2c 30 29 2c 50 28 44  |.N.1:.P(D,0),P(D|
00000160  2c 31 29 2c 50 28 44 2c  32 29 00 97 09 78 00 50  |,1),P(D,2)...x.P|
00000170  28 44 2c 33 29 b2 31 35  30 ab 28 50 28 44 2c 30  |(D,3).150.(P(D,0|
00000180  29 ac 32 35 30 30 ad 28  44 49 ab 50 28 44 2c 32  |).2500.(DI.P(D,2|
00000190  29 29 29 ad 36 00 c4 09  7a 00 50 28 44 2c 34 29  |))).6...z.P(D,4)|
000001a0  b2 31 30 30 ab 28 50 28  44 2c 31 29 ac 32 35 30  |.100.(P(D,1).250|
000001b0  30 ad 28 44 49 ab 50 28  44 2c 32 29 29 29 ad 36  |0.(DI.P(D,2))).6|
000001c0  3a 82 00 f3 09 7d 00 87  4e 3a 8b 4e b3 b1 ab 31  |:....}..N:.N...1|
000001d0  20 a7 20 99 22 49 4e 43  4f 52 52 45 43 54 20 4e  | . ."INCORRECT N|
000001e0  4f 20 4f 46 20 50 4f 49  4e 54 53 22 3a 89 31 38  |O OF POINTS":.18|
000001f0  30 00 31 0a 82 00 87 4e  3a 81 44 b2 30 a4 4e ab  |0.1....N:.D.0.N.|
00000200  31 3a 87 50 41 2c 50 42  3a 58 31 b2 50 28 50 41  |1:.PA,PB:X1.P(PA|
00000210  ab 31 2c 33 29 3a 58 32  b2 50 28 50 42 ab 31 2c  |.1,3):X2.P(PB.1,|
00000220  33 29 3a 59 31 b2 50 28  50 41 ab 31 2c 34 29 00  |3):Y1.P(PA.1,4).|
00000230  4a 0a 8c 00 59 32 b2 50  28 50 42 ab 31 2c 34 29  |J...Y2.P(PB.1,4)|
00000240  3a 8d 31 30 32 30 3a 82  00 53 0a 96 00 89 31 35  |:.1020:..S....15|
00000250  30 00 68 0a af 00 a1 4b  24 3a 8b 4b 24 b3 b1 22  |0.h....K$:.K$.."|
00000260  20 22 a7 31 37 35 00 82  0a b4 00 97 35 33 32 36  | ".175......5326|
00000270  35 2c c2 28 35 33 32 36  35 29 20 af 20 32 32 33  |5,.(53265) . 223|
00000280  00 a1 0a b9 00 97 35 33  32 37 32 2c 28 c2 28 35  |......53272,(.(5|
00000290  33 32 37 32 29 20 af 20  32 34 30 29 20 b0 34 00  |3272) . 240) .4.|
000002a0  a7 0a be 00 90 00 d2 0a  e8 03 42 59 54 45 b2 42  |..........BYTE.B|
000002b0  54 aa 37 36 38 37 ab 33  32 30 ac b5 28 59 ad 38  |T.7687.320..(Y.8|
000002c0  29 ab 28 59 af 37 29 aa  b5 28 58 ad 38 29 ac 38  |).(Y.7)..(X.8).8|
000002d0  00 e2 0a ed 03 42 49 54  b2 37 ab 28 58 af 37 29  |.....BIT.7.(X.7)|
000002e0  00 fd 0a f2 03 97 20 42  59 54 45 2c c2 28 42 59  |...... BYTE,.(BY|
000002f0  54 45 29 20 b0 20 32 ae  42 49 54 00 03 0b f7 03  |TE) . 2.BIT.....|
00000300  8e 00 2e 0b fc 03 8b 20  58 31 b3 b1 58 32 20 a7  |....... X1..X2 .|
00000310  20 4d b2 28 59 32 ab 59  31 29 ad 28 58 32 ab 58  | M.(Y2.Y1).(X2.X|
00000320  31 29 3a 43 b2 59 31 ab  4d ac 58 31 00 4b 0b 06  |1):C.Y1.M.X1.K..|
00000330  04 8b 20 b6 28 58 32 ab  58 31 29 b3 b6 28 59 32  |.. .(X2.X1)..(Y2|
00000340  ab 59 31 29 a7 31 31 30  30 00 5b 0b 10 04 8b 20  |.Y1).1100.[.... |
00000350  58 31 b2 58 32 20 a7 20  8e 00 77 0b 1a 04 81 58  |X1.X2 . ..w....X|
00000360  b2 58 31 20 a4 20 58 32  20 a9 20 32 ac b4 28 58  |.X1 . X2 . 2..(X|
00000370  32 ab 58 31 29 00 83 0b  24 04 59 b2 4d ac 58 aa  |2.X1)...$.Y.M.X.|
00000380  43 00 8d 0b 2e 04 8d 31  30 30 30 00 9f 0b 38 04  |C......1000...8.|
00000390  82 3a 58 31 b2 58 32 3a  59 31 b2 59 32 00 a5 0b  |.:X1.X2:Y1.Y2...|
000003a0  42 04 8e 00 bf 0b 4c 04  81 59 b2 59 31 20 a4 20  |B.....L..Y.Y1 . |
000003b0  59 32 20 a9 20 b4 28 59  32 ab 59 31 29 00 dd 0b  |Y2 . .(Y2.Y1)...|
000003c0  56 04 58 b2 58 31 3a 8b  20 58 31 b3 b1 58 32 20  |V.X.X1:. X1..X2 |
000003d0  a7 20 58 b2 28 59 ab 43  29 ad 4d 00 e7 0b 60 04  |. X.(Y.C).M...`.|
000003e0  8d 31 30 30 30 00 f9 0b  6a 04 82 3a 58 31 b2 58  |.1000...j..:X1.X|
000003f0  32 3a 59 31 b2 59 32 00  ff 0b 74 04 8e 00 3b 0c  |2:Y1.Y2...t...;.|
00000400  7e 04 83 20 38 2c 2d 35  30 30 2c 35 30 30 2c 35  |~.. 8,-500,500,5|
00000410  30 30 2c 35 30 30 2c 35  30 30 2c 35 30 30 2c 35  |00,500,500,500,5|
00000420  30 30 2c 2d 35 30 30 2c  35 30 30 2c 2d 35 30 30  |00,-500,500,-500|
00000430  2c 2d 35 30 30 2c 35 30  30 00 7c 0c 88 04 83 20  |,-500,500.|.... |
00000440  2d 35 30 30 2c 35 30 30  2c 2d 35 30 30 2c 35 30  |-500,500,-500,50|
00000450  30 2c 35 30 30 2c 2d 35  30 30 2c 35 30 30 2c 2d  |0,500,-500,500,-|
00000460  35 30 30 2c 2d 35 30 30  2c 2d 35 30 30 2c 2d 35  |500,-500,-500,-5|
00000470  30 30 2c 2d 35 30 30 2c  2d 31 00 b5 0c 92 04 83  |00,-500,-1......|
00000480  20 31 32 2c 31 2c 32 2c  32 2c 33 2c 33 2c 34 2c  | 12,1,2,2,3,3,4,|
00000490  34 2c 31 2c 31 2c 35 2c  32 2c 36 2c 33 2c 37 2c  |4,1,1,5,2,6,3,7,|
000004a0  34 2c 38 2c 35 2c 36 2c  36 2c 37 2c 37 2c 38 2c  |4,8,5,6,6,7,7,8,|
000004b0  38 2c 35 00 00 00                                 |8,5...|
000004b6