Home » Personal collection » Acorn ADFS disks » Electron » Autostereograms_1.ADF » AUTOSTEREO

AUTOSTEREO

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 » Acorn ADFS disks » Electron » Autostereograms_1.ADF
Filename: AUTOSTEREO
Read OK:
File size: 03D7 bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10MODE4
   20VDU 23,1,0;0;0;0;
   30width=320
   40height=256
   50EYES=90
   60PROCdraw3D("tophat")
   70 GOTO70
   80DEFPROCdraw3D(shape$)
   90DIMsame%(width)
  100DIMcolour%(width)
  110FOR y=height-1 TO 0 STEP -1
  120FOR x=0 TO width-1:same%(x)=x:NEXT x
  130FOR x=0 TO width-1
  140sep=FNshapes(shape$,x,y)
  150i=x-(sep+(sep AND y AND 1))/2
  160j=i+sep
  170IF i<0 OR j>=width THEN NEXT x:GOTO240
  180REPEAT
  190s=same%(i)
  200IF s<=j THEN i=s ELSE same%(i)=j:i=j:j=s
  210UNTIL same%(i)=INT i AND same%(j)=INT j
  220same%(i)=j
  230NEXT x
  240FOR x=width-1 TO 0 STEP -1
  250IF same%(x)=x THEN colour%(x)=RND(2) ELSE colour%(x)=colour%(same%(x))
  260IF colour%(x)=1 THEN MOVE 4*x,4*y:DRAW 4*x,4*y
  270NEXT x
  275 NEXT y
  280ENDPROC
  290DEFFNshapes(shape$,x,y)
  300IF shape$="tophat" THEN PROCtophat:=N
  310PRINT"No such shape":END
  320DEFPROCtophat
  330GROUND=EYES/2:HAT=GROUND-1
  340brimRadius=70:headRadius=30:brimHeight=25
  350N=GROUND
  360IF y>=height/2+brimRadius THEN ENDPROC
  370IF y>=height/2-brimRadius+brimHeight AND x>=width/2-headRadius AND x<width/2+headRadius THEN N=HAT:ENDPROC
  380IF y>=height/2-brimRadius AND x>=width/2-brimRadius AND x<width/2+brimRadius THEN N=HAT
  390ENDPROC

�4
� 23,1,0;0;0;0;

width=320
(height=256
2EYES=90
<�draw3D("tophat")
F
 �DF@
P��draw3D(shape$)
Z�same%(width)
d�colour%(width)
n� y=height-1 � 0 � -1
x"� x=0 � width-1:same%(x)=x:� x
�� x=0 � width-1
�sep=�shapes(shape$,x,y)
�i=x-(sep+(sep � y � 1))/2
�j=i+sep
� � i<0 � j>=width � � x:�dp@
��
�s=same%(i)
�%� s<=j � i=s � same%(i)=j:i=j:j=s
�!� same%(i)=� i � same%(j)=� j
�same%(i)=j
�� x
�� x=width-1 � 0 � -1
�A� same%(x)=x � colour%(x)=�(2) � colour%(x)=colour%(same%(x))
(� colour%(x)=1 � � 4*x,4*y:� 4*x,4*y
� x
 � y
�
"ݤshapes(shape$,x,y)
,"� shape$="tophat" � �tophat:=N
6�"No such shape":�
@��tophat
JGROUND=EYES/2:HAT=GROUND-1
T-brimRadius=70:headRadius=30:brimHeight=25
^N=GROUND
h � y>=height/2+brimRadius � �
r`� y>=height/2-brimRadius+brimHeight � x>=width/2-headRadius � x<width/2+headRadius � N=HAT:�
|S� y>=height/2-brimRadius � x>=width/2-brimRadius � x<width/2+brimRadius � N=HAT
��
�
00000000  0d 00 0a 06 eb 34 0d 00  14 13 ef 20 32 33 2c 31  |.....4..... 23,1|
00000010  2c 30 3b 30 3b 30 3b 30  3b 0d 00 1e 0d 77 69 64  |,0;0;0;0;....wid|
00000020  74 68 3d 33 32 30 0d 00  28 0e 68 65 69 67 68 74  |th=320..(.height|
00000030  3d 32 35 36 0d 00 32 0b  45 59 45 53 3d 39 30 0d  |=256..2.EYES=90.|
00000040  00 3c 15 f2 64 72 61 77  33 44 28 22 74 6f 70 68  |.<..draw3D("toph|
00000050  61 74 22 29 0d 00 46 0a  20 e5 8d 44 46 40 0d 00  |at")..F. ..DF@..|
00000060  50 14 dd f2 64 72 61 77  33 44 28 73 68 61 70 65  |P...draw3D(shape|
00000070  24 29 0d 00 5a 11 de 73  61 6d 65 25 28 77 69 64  |$)..Z..same%(wid|
00000080  74 68 29 0d 00 64 13 de  63 6f 6c 6f 75 72 25 28  |th)..d..colour%(|
00000090  77 69 64 74 68 29 0d 00  6e 19 e3 20 79 3d 68 65  |width)..n.. y=he|
000000a0  69 67 68 74 2d 31 20 b8  20 30 20 88 20 2d 31 0d  |ight-1 . 0 . -1.|
000000b0  00 78 22 e3 20 78 3d 30  20 b8 20 77 69 64 74 68  |.x". x=0 . width|
000000c0  2d 31 3a 73 61 6d 65 25  28 78 29 3d 78 3a ed 20  |-1:same%(x)=x:. |
000000d0  78 0d 00 82 13 e3 20 78  3d 30 20 b8 20 77 69 64  |x..... x=0 . wid|
000000e0  74 68 2d 31 0d 00 8c 1b  73 65 70 3d a4 73 68 61  |th-1....sep=.sha|
000000f0  70 65 73 28 73 68 61 70  65 24 2c 78 2c 79 29 0d  |pes(shape$,x,y).|
00000100  00 96 1d 69 3d 78 2d 28  73 65 70 2b 28 73 65 70  |...i=x-(sep+(sep|
00000110  20 80 20 79 20 80 20 31  29 29 2f 32 0d 00 a0 0b  | . y . 1))/2....|
00000120  6a 3d 69 2b 73 65 70 0d  00 aa 20 e7 20 69 3c 30  |j=i+sep... . i<0|
00000130  20 84 20 6a 3e 3d 77 69  64 74 68 20 8c 20 ed 20  | . j>=width . . |
00000140  78 3a e5 8d 64 70 40 0d  00 b4 05 f5 0d 00 be 0e  |x:..dp@.........|
00000150  73 3d 73 61 6d 65 25 28  69 29 0d 00 c8 25 e7 20  |s=same%(i)...%. |
00000160  73 3c 3d 6a 20 8c 20 69  3d 73 20 8b 20 73 61 6d  |s<=j . i=s . sam|
00000170  65 25 28 69 29 3d 6a 3a  69 3d 6a 3a 6a 3d 73 0d  |e%(i)=j:i=j:j=s.|
00000180  00 d2 21 fd 20 73 61 6d  65 25 28 69 29 3d a8 20  |..!. same%(i)=. |
00000190  69 20 80 20 73 61 6d 65  25 28 6a 29 3d a8 20 6a  |i . same%(j)=. j|
000001a0  0d 00 dc 0e 73 61 6d 65  25 28 69 29 3d 6a 0d 00  |....same%(i)=j..|
000001b0  e6 07 ed 20 78 0d 00 f0  18 e3 20 78 3d 77 69 64  |... x..... x=wid|
000001c0  74 68 2d 31 20 b8 20 30  20 88 20 2d 31 0d 00 fa  |th-1 . 0 . -1...|
000001d0  41 e7 20 73 61 6d 65 25  28 78 29 3d 78 20 8c 20  |A. same%(x)=x . |
000001e0  63 6f 6c 6f 75 72 25 28  78 29 3d b3 28 32 29 20  |colour%(x)=.(2) |
000001f0  8b 20 63 6f 6c 6f 75 72  25 28 78 29 3d 63 6f 6c  |. colour%(x)=col|
00000200  6f 75 72 25 28 73 61 6d  65 25 28 78 29 29 0d 01  |our%(same%(x))..|
00000210  04 28 e7 20 63 6f 6c 6f  75 72 25 28 78 29 3d 31  |.(. colour%(x)=1|
00000220  20 8c 20 ec 20 34 2a 78  2c 34 2a 79 3a df 20 34  | . . 4*x,4*y:. 4|
00000230  2a 78 2c 34 2a 79 0d 01  0e 07 ed 20 78 0d 01 13  |*x,4*y..... x...|
00000240  08 20 ed 20 79 0d 01 18  05 e1 0d 01 22 18 dd a4  |. . y......."...|
00000250  73 68 61 70 65 73 28 73  68 61 70 65 24 2c 78 2c  |shapes(shape$,x,|
00000260  79 29 0d 01 2c 22 e7 20  73 68 61 70 65 24 3d 22  |y)..,". shape$="|
00000270  74 6f 70 68 61 74 22 20  8c 20 f2 74 6f 70 68 61  |tophat" . .topha|
00000280  74 3a 3d 4e 0d 01 36 16  f1 22 4e 6f 20 73 75 63  |t:=N..6.."No suc|
00000290  68 20 73 68 61 70 65 22  3a e0 0d 01 40 0c dd f2  |h shape":...@...|
000002a0  74 6f 70 68 61 74 0d 01  4a 1e 47 52 4f 55 4e 44  |tophat..J.GROUND|
000002b0  3d 45 59 45 53 2f 32 3a  48 41 54 3d 47 52 4f 55  |=EYES/2:HAT=GROU|
000002c0  4e 44 2d 31 0d 01 54 2d  62 72 69 6d 52 61 64 69  |ND-1..T-brimRadi|
000002d0  75 73 3d 37 30 3a 68 65  61 64 52 61 64 69 75 73  |us=70:headRadius|
000002e0  3d 33 30 3a 62 72 69 6d  48 65 69 67 68 74 3d 32  |=30:brimHeight=2|
000002f0  35 0d 01 5e 0c 4e 3d 47  52 4f 55 4e 44 0d 01 68  |5..^.N=GROUND..h|
00000300  20 e7 20 79 3e 3d 68 65  69 67 68 74 2f 32 2b 62  | . y>=height/2+b|
00000310  72 69 6d 52 61 64 69 75  73 20 8c 20 e1 0d 01 72  |rimRadius . ...r|
00000320  60 e7 20 79 3e 3d 68 65  69 67 68 74 2f 32 2d 62  |`. y>=height/2-b|
00000330  72 69 6d 52 61 64 69 75  73 2b 62 72 69 6d 48 65  |rimRadius+brimHe|
00000340  69 67 68 74 20 80 20 78  3e 3d 77 69 64 74 68 2f  |ight . x>=width/|
00000350  32 2d 68 65 61 64 52 61  64 69 75 73 20 80 20 78  |2-headRadius . x|
00000360  3c 77 69 64 74 68 2f 32  2b 68 65 61 64 52 61 64  |<width/2+headRad|
00000370  69 75 73 20 8c 20 4e 3d  48 41 54 3a e1 0d 01 7c  |ius . N=HAT:...||
00000380  53 e7 20 79 3e 3d 68 65  69 67 68 74 2f 32 2d 62  |S. y>=height/2-b|
00000390  72 69 6d 52 61 64 69 75  73 20 80 20 78 3e 3d 77  |rimRadius . x>=w|
000003a0  69 64 74 68 2f 32 2d 62  72 69 6d 52 61 64 69 75  |idth/2-brimRadiu|
000003b0  73 20 80 20 78 3c 77 69  64 74 68 2f 32 2b 62 72  |s . x<width/2+br|
000003c0  69 6d 52 61 64 69 75 73  20 8c 20 4e 3d 48 41 54  |imRadius . N=HAT|
000003d0  0d 01 86 05 e1 0d ff                              |.......|
000003d7
AUTOSTEREO.m0
AUTOSTEREO.m1
AUTOSTEREO.m2
AUTOSTEREO.m4
AUTOSTEREO.m5