or, Fusion Power in Your Own Living Room for the 2068
Want real excitement bunky? How about a program that produces two matching random-dot grey screens? Pretty exciting, huh? Well, yes, in a way. This program doesn’t just make speckled screens. It then takes one of those speckled screens, and subtly shifts part of it. No visible change has occured, but it is possible to use the organic parallel processor on top of our spine to decode the shift, and show us the shape, as either a raised or sunken contour.
Theory
You have good vision if your eyes work, right? Wrong. You have good sight if your eyes work. If an Opthamologist puts drops in your eyes to measure acuity, he is evaluating the performance of your eyeballs. Vision involves massive “image processing” by your mind. The twin images from the eyes, already processed to some extent, are analyzed to generate an internal three-dimensional model of your field of view. Various subtle cues are used to generate your internal model – the most important of which are the differences between the two eyes’ view of the scene. This stereo effect is familiar to anyone that has used a stereopticon or seen “Jaws 3D”. Randot patterns, as Optometrists know them, depend upon the brain’s ability to correlate millions of data points, and generate a simple theory to organize them. The random dots within the shape are shifted to the right in the rightmost image. To the mind, when comparing the two images as two views of one object, this would only occur if a smooth patterned surface were moved towards the viewer. When the mind has finally correlated the positions of all the points (in this program, up to 21,875 of them) your perception of what you are looking at will change radically, and the shape will appear. No amount of image analysis within one of the screens could generate the image. Only the mind’s ability to imagine the shape of what is “really” out there allows you to see it. For you techo-buffs, try this: cut the screens apart, then after getting fusion, and seeing the shape, try rotating one of the screens SLOWLY. You should be able to fuse the two screens with up to a five degree skew! Try that on your optical character reader!


Practice
If you have access to an old stereopticon, simply replace the photographic print slides with the printouts from this program. However, a viewer is not necessary. Stereo perception depends upon the fusion to the two images. That is, the eyes are pulled in until the images “overlap”. This pulling-in is called convergence. In normal use of your eyes, you do this all the time.
By holding a finger 5″ in front of your nose, you will notice that it takes a definite effort to shift your gaze from this page to your finger. You may aso notice that there were two transparent images of your finger when you looked at the page, which came together as you looked at the finger. If you hold a finger up at a greater distance, and pull in with your eyes in the same way, you will now see two fingers; the images from each eye are no longer superimposed. Now, if you hold two fingers up, it is possible to pull in in the same way, and see four fingers. By moving the fingers together, or by varying the “pull” you exert with your eyes, you can cause the two inner images to overlap, and end up “seeing” three fingers! The fingers will be blurry at first, but by thinking of the center image and relaxing, they will clear up. It is this same skill which will let you percieve the hidden shape. Holding the printout up, or regarding the screen, pull in until the third screen is clear and sharp. If one image is higher than the other, tip your head slightly to the side until they are at the same level, then fuse them.
Observe the individual pixels – scan from one corner to the other. There will be an area of “wrongness”, that will gradually clarify into a clearly defined shape, raised from the background. By cutting out the printouts and reversing them, you will see the same pattern, but with a significant difference. You’ll notice that I haven’t told you what shape to expect -if you can get fusion, you’ll see the shape. If you find the above directions easy to follow, try to look through the sheet to the far distance. Hold the cards farther away than you would expect, and use reading glasses if you have them. If you can fuse the two screens now, you will see a subtle change in the appearance of the pattern.
The program
I’ve been free with REM’s in the program, but there may be some areas that don’t make sense. The program sequence is not obvious – I’ve moved the least used routines to the upper end, and the most often called subroutines to the front. Program flow is as follows: Upon loading, the program autostarts at 9800, setting up and loading the printer driver. RUN then transferrs control to the expected sequence. The 7000’s contain the setup lines and the main menu. At 7020, I load a prepared sample screen, then print the titles over it. Just drop this LOAD to simplify operation. You are offered the option of scanning the instructions (held in lines 8000-). The rather peculiar spacing of the instruction lines assures that they will land on the correct parts of the screen. Line 7050 establishes the line numbers of the various subroutines. (If you want to look at one of those subroutines after the program is loaded, just type “LIST move” for example.) Line 7180 keeps you from setting up a screen until you’ve selected a shape. Here the user is asked for a grain size. This variable determines the coarseness of the “pixels” used in the grey tone. Values of 1-3 produce useable screens for fusion, while values of 10-20 let you check the operation of the programquickly. At lines 7220-30, a screen is either drawn (6000) or LOADed (5000). If a new screen has been drawn, you are offered the option of SAVEing it. Files will be SAVEd as “grain5.scr”, for example, for a screen of grain 5, to remind you to set the grain value correctly. Once you have taken the considerable time to generate a grain 1 or grain 2 screen, there is little need to generate another. It is much quicker to reLOAD a screen, then try a new shape on it. Then control passes to the “shift” sub (4000). Here, you must decide how far to slide the shape. This distance is expressed in pixels: if you select a value smaller than the grain size, nothing will happen. The farther the shape is slid, the farther it will stand out from the background – but it will also be harder to clearly fuse the image. The particular shape chosen is determined by the variable “shape” which is used as a subroutine vector (1000-). The “move” sub (2000) takes care of the mechanics of PLOTting and UNPLOTting on the 2068. The attempt is to exactly move each “pixel” within the shape. When the shape has been moved, you will have the option to print a hard copy, SAVE the screen, or try again. The SAVE routine at line 4110 generates file names such as gr-5shp.scr as a reminder of the correct grain size.
SAVE and LOAD commands are tailored for the AERCO disk system. If you’re using tape, you’ll have to change the lines that now contain either CAT or MOVE.
MOVE “xxxx.bas”,9800 = SAVE “xxxx” LINE 9800 MOVE “xxxx.scr”, = SAVE “xxxx” SCREEN$ LET r$=”xxx.scr”””,”: MOVE “r$”, = SAVE r$ CAT “xxxx.bas”, = LOAD “xxxx” CAT “xxxx.scr”,9800 = SAVE “xxxx” SCREEN$
Likewise, COPY is invoked on my system with “RANDOMIZE USR 64628”. There is also a corrected version of my “renum” program at 9000, and a short routine at 9500 to set up my printer for LLISTings.
Have fun, and don’t strain your eyes! (You needn’t worry about getting your eyes stuck crossed.)
The Listing
10 REM by Mark Fisher - 1988
20 GO TO 7000
100 REM ****** fill ******
110 FOR i=0 TO grain-1
120 PLOT x,y-i: DRAW grain-1,0
130 PLOT x+130,y-i: DRAW grain-1,0
140 NEXT i
150 RETURN
1000 REM ****** test ******
1010 REM returns variable "ok"=1 if within given shape: "ok"=0 if not
1020 REM circle shape
1030 LET tx=x-62: LET ty=y-87
1040 LET ok=(tx*tx+ty*ty<2500)
1050 RETURN
1100 REM tower shape
1110 LET tx=x-60: LET ty=y-150
1120 LET ok=(tx*tx+ty*4<40) AND (y>30)
1130 RETURN
1200 REM donut shape
1210 LET tx=x-62: LET ty=y-87
1220 LET n=tx*tx+ty*ty
1230 LET ok=(n<2500) AND (n>1000)
1240 RETURN
1300 REM square shape
1310 LET ok=x<100 AND x>20 AND y<145 AND y>30
1320 RETURN
1400 REM box shape
1410 GO SUB 1300
1420 LET ok=ok AND (NOT (x<75 AND x>50 AND y<120 AND y>55))
1430 RETURN
2000 REM *** move ***
2010 REM shape development line: OVER 1: PLOT x+1,y-1: OVER 0
2020 IF POINT (x,y)=POINT (x+disp,y) THEN RETURN : REM if dest = point, no action needed
2030 OVER POINT (x+disp,y): REM if destination is inked in, erase it with OVER 0
2040 FOR i=0 TO grain-1
2050 PLOT x+130+disp,y-i: DRAW grain-1,0
2060 NEXT i
2070 OVER 0
2080 RETURN
4000 REM *** shift shape ***
4010 INPUT "What displacement? (-5 - 20) ";disp
4020 LET disp=INT (disp/grain)*grain: REM reduce disp to even grain interval (disp MOD grain)
4030 REM shape development line: CLS : P
LOT 0,175: DRAW 125,0: DRAW 0,-175: DRAW -125,0: DRAW 0,175
4040 FOR y=175 TO 0+grain STEP -grain
4045 PLOT 126,y: DRAW 3,0
4050 FOR x=0 TO 125-grain STEP grain
4060 GO SUB shape: REM returns variable "ok" if within given shape
4070 IF ok THEN GO SUB move
4080 NEXT x
4085 OVER 1: PLOT 126,y: DRAW 3,0: OVER 0
4090 NEXT y
4100 PRINT #0;AT 1,0;"(C)OPY (S)AVE (ENT) Try again ";: PAUSE 0
4110 IF INKEY$="s" OR INKEY$="S" THEN LET r$="gr-"+STR$ grain+"shp.scr"",": MOVE "r$",
4120 IF INKEY$="c" THEN PRINT #0;AT 1,0;" ": RANDOMIZE USR 64628: REM AERCO screen graphics dump
4130 IF INKEY$=CHR$ 13 THEN RETURN
4140 GO TO 4100
5000 REM **** load screen *****
5010 CAT "",: INPUT "Load what file? ";r$
5020 LET r$=r$+".scr"","
5030 CAT "r$",
5040 RETURN
6000 REM *** draw random screen *****
6010 CLS
6020 PLOT 0,175: DRAW 125,0: DRAW 0,-175: DRAW -125,0: DRAW 0,175
6030 PLOT 130,175: DRAW 125,0: DRAW 0,-175: DRAW -125,0: DRAW 0,175
6040 FOR y=175 TO 0+grain STEP -grain
6050 FOR x=0 TO 125-grain STEP grain
6060 IF RND>.5 THEN GO SUB fill
6070 NEXT x
6080 NEXT y
6090 PRINT #0;"Save screen? (S)ave/ENT ";: PAUSE 0
6100 IF INKEY$="s" OR INKEY$="S" THEN LET r$="grain"+STR$ grain+".scr"",": MOVE "r$",
6110 RETURN
7000 REM ***** setup screen ****
7010 PAPER 0: INK 7: BORDER 2: CLS
7020 REM CAT "eye3.scr",: PRINT AT 5,0;TAB 6;"Eyes "''TAB 12;"Versus "''TAB 20;"Mind "''': REM ERASE first statement if no screen file available
7021 PRINT AT 5,0;TAB 6;"Eyes "''TAB 12;"Versus "''TAB 20;"Mind "'''
7030 PRINT TAB 8;"by Mark Fisher, 1988 "
7040 PRINT #1;"Instructions? (y-n) ";: PAUSE 0
7050 LET s$="0": LET fill=100: LET move=2000: LET shift=4000: LET load=5000: LET draw=6000: LET menu=7120: LET inst=8000: LET query=8900: REM subroutines
7060 IF INKEY$<>"n" THEN GO SUB inst
7070 REM circle=1000
7080 REM tower=1100
7090 REM donut=1200
7100 REM square=1300
7110 REM box=1400
7120 CLS
7130 PRINT "Main Menu"''"Select shape:"''"no shape selected"'"1) Circle"'"2) Tower"'"3) Donut"'"4) Square"'"5) Box"''"6) Draw Screen"'"7) Load Screen"'"8) STOP "
7140 OVER 1: INVERSE 1: PRINT AT VAL s$+4,0;" ": INVERSE 0: OVER 0
7150 PAUSE 0: LET r$=INKEY$
7160 IF r$<"1" OR r$>"8" THEN GO TO menu
7170 IF r$<"6" THEN LET shape=1000+((VAL r$)-1)*100: LET s$=r$: GO TO menu
7180 IF s$="0" THEN GO TO menu
7185 IF r$="8" THEN CLS : PRINT " RUN TO restart": STOP
7190 OVER 1: INVERSE 1: PRINT AT VAL r$+5,0;" ": INVERSE 0: OVER 0: REM highlights selection
7200 INPUT "What grain size? (1-20) ";grain
7210 REM grain= "pixel" size
7220 IF r$="6" THEN GO SUB draw
7230 IF r$="7" THEN GO SUB load
7240 GO SUB shift
7250 GO TO menu
7999 STOP
8000 REM *** intro ****
8010 CLS
8020 PRINT "This program will let you explore the space between what you SEE, and what you KNOW."
8030 PRINT '"The screen will be split into two windows. By pulling your eyes in (crossing them) you can superimpose the two screens, andsee a third in the middle."
8040 PRINT '"By relaxing, while attending to the middle image, it will becomeclear. At this point, if your mind's ability to fuse images iswell developed, you will be ableto see a hidden shape."
8050 PRINT "While your eyes can only see therandom dots on the screen, your mind compares the masses of dataand synthesizes the image."
8060 GO SUB query
8070 PRINT "USING THE PROGRAM"''"You will be asked for a grain size. This determines the ""pixelsize used by the program."
8080>PRINT '"Values above 5 provide qu ick op-eration of the program, but poorresolution of the completed fig-ure."
8090 PRINT '"You then will be asked for a displacement value. This deter- mines the apparent relief bet- ween the figure and the back- ground. Large values will be harder to fuse."
8100 PRINT '"Two identical screens will then be built up. When they are com- pleted, you will have the optionof saving them. You can then re-load the screen instead of creating a new one."
8110 GO SUB query
8120 PRINT '"You can then try out various shapes without waiting for a newscreen to be drawn each time."
8130 PRINT '"Be sure to use the same grain size if you re-load the screen."
8140 GO SUB query
8150 RETURN
8900 REM *** query sub ***
8910 PRINT #1;"(C)opy-(N)ext page";: PAUSE 0
8920 IF INKEY$="c" OR INKEY$="C" THEN RANDOMIZE USR 64628: REM COPY if not using AERCO i/f
8930 CLS
8940 RETURN
8999 STOP
9000 REM *** renumber & save ***
9010 INPUT "Start ";start
9020 INPUT "End ";end
9030 IF end>=9000 THEN LET end=9000
9040 INPUT "Start renumber using ";n
9050 LET x=PEEK 23635+256*PEEK 23636
9060 IF PEEK x*256+PEEK (x+1)<start THEN GO TO 9110
9070 IF PEEK x*256+PEEK (x+1)>=end THEN STOP
9080 POKE x,INT (n/256)
9090 POKE x+1,n-PEEK x*256
9100 LET n=n+10
9110 LET x=x+4+PEEK (x+2)+256*PEEK (x+3)
9120 GO TO 9060
9500 REM set printer width
9510 INPUT "width ? ";n
9520 POKE 64259,n-1
9530 INPUT "Set Character type? ";r$
9540 POKE 64256,0: LPRINT CHR$ 27+r$: POKE 64256,1
9550 STOP
9800>CLEAR 64255:LET p=64261:POKE 26704 ,INT (p/256):POKE 26703,p-(INT (p/256)*256):CAT "prcode.BIN",64256
9810 PRINT "DRIVER LOADED & INITIALIZED": RUN
9900 OUT 244,1: MOVE "AutoEyes.BAS",9800: REM : MOVE "prcode.BIN",64256,1111
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.