Home » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » PD/3D_Tutor/3DText
PD/3D_Tutor/3DText
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 » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s |
Filename: | PD/3D_Tutor/3DText |
Read OK: | ✔ |
File size: | 1EED bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Since the 1980's, several films have been screened that feature 3D vision. The effect can be quite fantastic - depending on the technique used. Probably the most well known method is using the red/green glasses, but this does have the disadvantage that colour cannot be used. Another technique is using polarised light. This requires two projectors which polarise the beams of light differently (90� 'apart'). The glasses then block out one of the beams by having polarised lenses. This is debatably the most effective method, allowing full colour. Another form of three dimensional vision is to have a single screen that flickers between the display for the left and right eyes. The glasses are then synchronised to do the same. The Sega system uses this form, but it suffers from a very flickery image. Because the average user does not have access to polarised light projectors or 'flickery' glasses, the first method is a good choice to demonstrate the 3D effect. The first thing we must understand before we venture into the world of 3D is how the eye perceives 'depth'. Our eyes, surprisingly enough, move independently. They move so as to focus in on an object. When an object is close to 'infinity' (as far away as possible) our eyes are near parallel, that is point directly ahead and each eyes' line of sight converges a long distance away. When our eyes point near parallel, our brain assumes the object to be a long way away. When an object is near, the eyes swing towards into other, converging at a closer point. This can be seen when somebody tries to look at their nose. If the eyes point inwards, our brain believes the object to be close. Now, how do we convert that theory onto the screen? Well, under normal circumstances, each eyes' line of sight converges at the screen. If an object is to be seen behind the monitor (further away), we must instruct each eye to swing outwards, towards the parallel. This can be expressed as : the left eye's image must be further to the left, and the right eye's image must be further to the right. From this, we should realise that the image passed to the left eye should be on the left, and the image for the right eye, on the right. Therefore, we can expect forward projections (in front of the monitor) to have the right eye's image at the left, and the left image at the right. This will make the lines of sight converge before the screen. Note however, that the distance between the left and right images should not exceed the distance between each eye, otherwise the 3D effect is lost. Indeed, due to the inability to exactly match the colour of the glasses, a separation of about 32 OS units is all we can expect. Now is where the glasses come in - separating the left eye's image and the right eye's. The lenses in each eye are a different colour - normally red and green, or red and blue. The glasses I used were red in the left eye and blue in the right. The same glasses could possibly be obtained from your local cinema, as they were used for the film, "Freddy's Dead". Anyway, one lens will totally block out the colour of the other. Therefore, by making the left image the colour of the left lens, and the right image the colour of the right lens, it is possible to separate the picture on the screen. Probably the hardest part of creating a 3D image is finding the exact colour of each lens. The simplest way of doing this is to run listing one (found on the free subscription disc). It will initially draw a red circle in the centre of the screen. Place a lens over it and alter the colour (which is displayed as three figures at the top of the screen) by using the keys as described. When the circle appears as dark as possible in one lens, but is still bright in the other, note down the colour numbers (and which lens it was visible in) and repeat with the other lens. You may find all this easier in a dark room. An example of the sort of effect that can be achieved with the information described here can be seen with listing two - a three dimensional star field. Close all the curtains and doors - the 3D effect can best be seen in total darkness - and run the program. If you own a television, you will notice a poor effect, if any. The only way to avoid this is to use a good quality PAL encoder, or use a monitor. The better the quality of the monitor, the more amazing the effect. If you can see 'ghosting', that is seeing both red and blue (or whatever colours the lenses are) lines, try moving away from the screen more - on a good multisync, it is possible to sit normally at the computer and still see a clear picture. If you find stars a little boring, take a look at listing three. This is the source code to create the module '3DPlotMod'. This module provides one SWI that can be accessed from BASIC, or most other languages. This function allows 3D vector graphics to be produced, by passing the x,y and z coordinates. The appropriate red and blue shapes will be drawn. To use it from BASIC, for example, you should enter : SYS "3D_Plot",plot action,x,y,z x,y and z are the coordinates of the line, arc or whatever you wish to draw. The plot action parameter is the same as for VDU25 (Plot). For those of you without PRM, here's a summary of the codes : All codes can be expressed as "<base> + <action>". the Base number tells the computer what shap you wish to draw. Action tells the computer how you want to draw it. The base values are as follows : 0 - draw a line, or move to the point 64 - plot a point 80 - draw a filled triangle 96 - draw a filled rectangle 112 - draw a filled parallelogram 144 - draw a circle outline 152 - draw a filled circle 160 - draw an arc 168 - draw a segment 176 - draw a sector 192 - draw an ellipse outline 200 - draw a filled ellipse The action values that should be added to the above bases are as follows : 0 - move relative to the last position visited (MOVE BY) 1 - draw relative to the last position visited 4 - move to the given position 5 - draw at the given position Codes 0 and 1 can be illustrated : If the last point you moved (or drew) to was 400,600 and you issued a move by (value 0) 100,-200 the new position would be 500,400. As an example, let us draw a line from 300,676,375 to 274,607,374 What you must do is : Move to one end ... SYS "3D_Plot",4,300,676,375 And then draw a line to the other ... SYS "3D_Plot",5,274,607,374 To draw a more complex shape, such as a triangle, move to the two corners and issue a 85 (ie. 80 + 5) for the final corner. Listing four is a final summary of the ideas described here. It contains the start-field from listing two, and adds a spinning pyramid bouncing backwards and forwards. The pyramid is drawn in machine code for speed, and uses the 3DPlotMod for the vector graphics. Note that to run this program, you must have the Module 3DLines loaded - this can be achieved by double-clicking on the 3DPlotMod icon in the desktop. The application !3DSetup is a simple program that defines the colours used for the left and right lenses. This can be used to adjust the colours to suit you - everyones eyes' see light and colour differently. Run the application as normal by double- clicking on its icon. Then, to change the left lens colour, press 'L', or 'R' to change the right one. Then, follow the instructions on the screen. When you exit from the program (not by pressing Escape), the settings you have changed will be saved to disc. Note that this will not work if you are running !3DSetUp from an archive, ie. follow the instructions in the magazine on how to unpack the archive. From now on, all the programs will use these settings for their colours. Many thanks to Vincent Sanders and the local cinema for their tremendous support for this project and their help with the research into 3D techniques.
00000000 53 69 6e 63 65 20 74 68 65 20 31 39 38 30 27 73 |Since the 1980's| 00000010 2c 20 73 65 76 65 72 61 6c 20 66 69 6c 6d 73 20 |, several films | 00000020 68 61 76 65 20 62 65 65 6e 20 73 63 72 65 65 6e |have been screen| 00000030 65 64 20 74 68 61 74 20 66 65 61 74 75 72 65 20 |ed that feature | 00000040 0a 33 44 20 76 69 73 69 6f 6e 2e 20 54 68 65 20 |.3D vision. The | 00000050 65 66 66 65 63 74 20 63 61 6e 20 62 65 20 71 75 |effect can be qu| 00000060 69 74 65 20 66 61 6e 74 61 73 74 69 63 20 2d 20 |ite fantastic - | 00000070 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 |depending on the| 00000080 20 0a 74 65 63 68 6e 69 71 75 65 20 75 73 65 64 | .technique used| 00000090 2e 20 50 72 6f 62 61 62 6c 79 20 74 68 65 20 6d |. Probably the m| 000000a0 6f 73 74 20 77 65 6c 6c 20 6b 6e 6f 77 6e 20 6d |ost well known m| 000000b0 65 74 68 6f 64 20 69 73 20 75 73 69 6e 67 20 74 |ethod is using t| 000000c0 68 65 20 0a 72 65 64 2f 67 72 65 65 6e 20 67 6c |he .red/green gl| 000000d0 61 73 73 65 73 2c 20 62 75 74 20 74 68 69 73 20 |asses, but this | 000000e0 64 6f 65 73 20 68 61 76 65 20 74 68 65 20 64 69 |does have the di| 000000f0 73 61 64 76 61 6e 74 61 67 65 20 74 68 61 74 20 |sadvantage that | 00000100 0a 63 6f 6c 6f 75 72 20 63 61 6e 6e 6f 74 20 62 |.colour cannot b| 00000110 65 20 75 73 65 64 2e 20 41 6e 6f 74 68 65 72 20 |e used. Another | 00000120 74 65 63 68 6e 69 71 75 65 20 69 73 20 75 73 69 |technique is usi| 00000130 6e 67 20 70 6f 6c 61 72 69 73 65 64 20 0a 6c 69 |ng polarised .li| 00000140 67 68 74 2e 20 54 68 69 73 20 72 65 71 75 69 72 |ght. This requir| 00000150 65 73 20 74 77 6f 20 70 72 6f 6a 65 63 74 6f 72 |es two projector| 00000160 73 20 77 68 69 63 68 20 70 6f 6c 61 72 69 73 65 |s which polarise| 00000170 20 74 68 65 20 62 65 61 6d 73 20 6f 66 20 0a 6c | the beams of .l| 00000180 69 67 68 74 20 64 69 66 66 65 72 65 6e 74 6c 79 |ight differently| 00000190 20 28 39 30 b0 20 27 61 70 61 72 74 27 29 2e 20 | (90. 'apart'). | 000001a0 54 68 65 20 67 6c 61 73 73 65 73 20 74 68 65 6e |The glasses then| 000001b0 20 62 6c 6f 63 6b 20 6f 75 74 20 6f 6e 65 20 0a | block out one .| 000001c0 6f 66 20 74 68 65 20 62 65 61 6d 73 20 62 79 20 |of the beams by | 000001d0 68 61 76 69 6e 67 20 70 6f 6c 61 72 69 73 65 64 |having polarised| 000001e0 20 6c 65 6e 73 65 73 2e 20 54 68 69 73 20 69 73 | lenses. This is| 000001f0 20 64 65 62 61 74 61 62 6c 79 20 74 68 65 20 0a | debatably the .| 00000200 6d 6f 73 74 20 65 66 66 65 63 74 69 76 65 20 6d |most effective m| 00000210 65 74 68 6f 64 2c 20 61 6c 6c 6f 77 69 6e 67 20 |ethod, allowing | 00000220 66 75 6c 6c 20 63 6f 6c 6f 75 72 2e 0a 41 6e 6f |full colour..Ano| 00000230 74 68 65 72 20 66 6f 72 6d 20 6f 66 20 74 68 72 |ther form of thr| 00000240 65 65 20 64 69 6d 65 6e 73 69 6f 6e 61 6c 20 76 |ee dimensional v| 00000250 69 73 69 6f 6e 20 69 73 20 74 6f 20 68 61 76 65 |ision is to have| 00000260 20 61 20 73 69 6e 67 6c 65 20 0a 73 63 72 65 65 | a single .scree| 00000270 6e 20 74 68 61 74 20 66 6c 69 63 6b 65 72 73 20 |n that flickers | 00000280 62 65 74 77 65 65 6e 20 74 68 65 20 64 69 73 70 |between the disp| 00000290 6c 61 79 20 66 6f 72 20 74 68 65 20 6c 65 66 74 |lay for the left| 000002a0 20 61 6e 64 20 72 69 67 68 74 20 0a 65 79 65 73 | and right .eyes| 000002b0 2e 20 54 68 65 20 67 6c 61 73 73 65 73 20 61 72 |. The glasses ar| 000002c0 65 20 74 68 65 6e 20 73 79 6e 63 68 72 6f 6e 69 |e then synchroni| 000002d0 73 65 64 20 74 6f 20 64 6f 20 74 68 65 20 73 61 |sed to do the sa| 000002e0 6d 65 2e 20 54 68 65 20 53 65 67 61 20 0a 73 79 |me. The Sega .sy| 000002f0 73 74 65 6d 20 75 73 65 73 20 74 68 69 73 20 66 |stem uses this f| 00000300 6f 72 6d 2c 20 62 75 74 20 69 74 20 73 75 66 66 |orm, but it suff| 00000310 65 72 73 20 66 72 6f 6d 20 61 20 76 65 72 79 20 |ers from a very | 00000320 66 6c 69 63 6b 65 72 79 20 69 6d 61 67 65 2e 0a |flickery image..| 00000330 42 65 63 61 75 73 65 20 74 68 65 20 61 76 65 72 |Because the aver| 00000340 61 67 65 20 75 73 65 72 20 64 6f 65 73 20 6e 6f |age user does no| 00000350 74 20 68 61 76 65 20 61 63 63 65 73 73 20 74 6f |t have access to| 00000360 20 70 6f 6c 61 72 69 73 65 64 20 6c 69 67 68 74 | polarised light| 00000370 20 0a 70 72 6f 6a 65 63 74 6f 72 73 20 6f 72 20 | .projectors or | 00000380 27 66 6c 69 63 6b 65 72 79 27 20 67 6c 61 73 73 |'flickery' glass| 00000390 65 73 2c 20 74 68 65 20 66 69 72 73 74 20 6d 65 |es, the first me| 000003a0 74 68 6f 64 20 69 73 20 61 20 67 6f 6f 64 20 0a |thod is a good .| 000003b0 63 68 6f 69 63 65 20 74 6f 20 64 65 6d 6f 6e 73 |choice to demons| 000003c0 74 72 61 74 65 20 74 68 65 20 33 44 20 65 66 66 |trate the 3D eff| 000003d0 65 63 74 2e 0a 0a 54 68 65 20 66 69 72 73 74 20 |ect...The first | 000003e0 74 68 69 6e 67 20 77 65 20 6d 75 73 74 20 75 6e |thing we must un| 000003f0 64 65 72 73 74 61 6e 64 20 62 65 66 6f 72 65 20 |derstand before | 00000400 77 65 20 76 65 6e 74 75 72 65 20 69 6e 74 6f 20 |we venture into | 00000410 74 68 65 20 0a 77 6f 72 6c 64 20 6f 66 20 33 44 |the .world of 3D| 00000420 20 69 73 20 68 6f 77 20 74 68 65 20 65 79 65 20 | is how the eye | 00000430 70 65 72 63 65 69 76 65 73 20 27 64 65 70 74 68 |perceives 'depth| 00000440 27 2e 20 4f 75 72 20 65 79 65 73 2c 20 0a 73 75 |'. Our eyes, .su| 00000450 72 70 72 69 73 69 6e 67 6c 79 20 65 6e 6f 75 67 |rprisingly enoug| 00000460 68 2c 20 6d 6f 76 65 20 69 6e 64 65 70 65 6e 64 |h, move independ| 00000470 65 6e 74 6c 79 2e 20 54 68 65 79 20 6d 6f 76 65 |ently. They move| 00000480 20 73 6f 20 61 73 20 74 6f 20 66 6f 63 75 73 20 | so as to focus | 00000490 0a 69 6e 20 6f 6e 20 61 6e 20 6f 62 6a 65 63 74 |.in on an object| 000004a0 2e 0a 57 68 65 6e 20 61 6e 20 6f 62 6a 65 63 74 |..When an object| 000004b0 20 69 73 20 63 6c 6f 73 65 20 74 6f 20 27 69 6e | is close to 'in| 000004c0 66 69 6e 69 74 79 27 20 28 61 73 20 66 61 72 20 |finity' (as far | 000004d0 61 77 61 79 20 61 73 20 70 6f 73 73 69 62 6c 65 |away as possible| 000004e0 29 20 0a 6f 75 72 20 65 79 65 73 20 61 72 65 20 |) .our eyes are | 000004f0 6e 65 61 72 20 70 61 72 61 6c 6c 65 6c 2c 20 74 |near parallel, t| 00000500 68 61 74 20 69 73 20 70 6f 69 6e 74 20 64 69 72 |hat is point dir| 00000510 65 63 74 6c 79 20 61 68 65 61 64 20 61 6e 64 20 |ectly ahead and | 00000520 65 61 63 68 20 0a 65 79 65 73 27 20 6c 69 6e 65 |each .eyes' line| 00000530 20 6f 66 20 73 69 67 68 74 20 63 6f 6e 76 65 72 | of sight conver| 00000540 67 65 73 20 61 20 6c 6f 6e 67 20 64 69 73 74 61 |ges a long dista| 00000550 6e 63 65 20 61 77 61 79 2e 20 57 68 65 6e 20 6f |nce away. When o| 00000560 75 72 20 65 79 65 73 20 0a 70 6f 69 6e 74 20 6e |ur eyes .point n| 00000570 65 61 72 20 70 61 72 61 6c 6c 65 6c 2c 20 6f 75 |ear parallel, ou| 00000580 72 20 62 72 61 69 6e 20 61 73 73 75 6d 65 73 20 |r brain assumes | 00000590 74 68 65 20 6f 62 6a 65 63 74 20 74 6f 20 62 65 |the object to be| 000005a0 20 61 20 6c 6f 6e 67 20 0a 77 61 79 20 61 77 61 | a long .way awa| 000005b0 79 2e 0a 57 68 65 6e 20 61 6e 20 6f 62 6a 65 63 |y..When an objec| 000005c0 74 20 69 73 20 6e 65 61 72 2c 20 74 68 65 20 65 |t is near, the e| 000005d0 79 65 73 20 73 77 69 6e 67 20 74 6f 77 61 72 64 |yes swing toward| 000005e0 73 20 69 6e 74 6f 20 6f 74 68 65 72 2c 20 0a 63 |s into other, .c| 000005f0 6f 6e 76 65 72 67 69 6e 67 20 61 74 20 61 20 63 |onverging at a c| 00000600 6c 6f 73 65 72 20 70 6f 69 6e 74 2e 20 54 68 69 |loser point. Thi| 00000610 73 20 63 61 6e 20 62 65 20 73 65 65 6e 20 77 68 |s can be seen wh| 00000620 65 6e 20 73 6f 6d 65 62 6f 64 79 20 0a 74 72 69 |en somebody .tri| 00000630 65 73 20 74 6f 20 6c 6f 6f 6b 20 61 74 20 74 68 |es to look at th| 00000640 65 69 72 20 6e 6f 73 65 2e 20 49 66 20 74 68 65 |eir nose. If the| 00000650 20 65 79 65 73 20 70 6f 69 6e 74 20 69 6e 77 61 | eyes point inwa| 00000660 72 64 73 2c 20 6f 75 72 20 62 72 61 69 6e 20 0a |rds, our brain .| 00000670 62 65 6c 69 65 76 65 73 20 74 68 65 20 6f 62 6a |believes the obj| 00000680 65 63 74 20 74 6f 20 62 65 20 63 6c 6f 73 65 2e |ect to be close.| 00000690 0a 0a 4e 6f 77 2c 20 68 6f 77 20 64 6f 20 77 65 |..Now, how do we| 000006a0 20 63 6f 6e 76 65 72 74 20 74 68 61 74 20 74 68 | convert that th| 000006b0 65 6f 72 79 20 6f 6e 74 6f 20 74 68 65 20 73 63 |eory onto the sc| 000006c0 72 65 65 6e 3f 20 57 65 6c 6c 2c 20 75 6e 64 65 |reen? Well, unde| 000006d0 72 20 0a 6e 6f 72 6d 61 6c 20 63 69 72 63 75 6d |r .normal circum| 000006e0 73 74 61 6e 63 65 73 2c 20 65 61 63 68 20 65 79 |stances, each ey| 000006f0 65 73 27 20 6c 69 6e 65 20 6f 66 20 73 69 67 68 |es' line of sigh| 00000700 74 20 63 6f 6e 76 65 72 67 65 73 20 61 74 20 74 |t converges at t| 00000710 68 65 20 0a 73 63 72 65 65 6e 2e 20 49 66 20 61 |he .screen. If a| 00000720 6e 20 6f 62 6a 65 63 74 20 69 73 20 74 6f 20 62 |n object is to b| 00000730 65 20 73 65 65 6e 20 62 65 68 69 6e 64 20 74 68 |e seen behind th| 00000740 65 20 6d 6f 6e 69 74 6f 72 20 28 66 75 72 74 68 |e monitor (furth| 00000750 65 72 20 0a 61 77 61 79 29 2c 20 77 65 20 6d 75 |er .away), we mu| 00000760 73 74 20 69 6e 73 74 72 75 63 74 20 65 61 63 68 |st instruct each| 00000770 20 65 79 65 20 74 6f 20 73 77 69 6e 67 20 6f 75 | eye to swing ou| 00000780 74 77 61 72 64 73 2c 20 74 6f 77 61 72 64 73 20 |twards, towards | 00000790 74 68 65 20 0a 70 61 72 61 6c 6c 65 6c 2e 20 54 |the .parallel. T| 000007a0 68 69 73 20 63 61 6e 20 62 65 20 65 78 70 72 65 |his can be expre| 000007b0 73 73 65 64 20 61 73 20 3a 20 74 68 65 20 6c 65 |ssed as : the le| 000007c0 66 74 20 65 79 65 27 73 20 69 6d 61 67 65 20 6d |ft eye's image m| 000007d0 75 73 74 20 62 65 20 0a 66 75 72 74 68 65 72 20 |ust be .further | 000007e0 74 6f 20 74 68 65 20 6c 65 66 74 2c 20 61 6e 64 |to the left, and| 000007f0 20 74 68 65 20 72 69 67 68 74 20 65 79 65 27 73 | the right eye's| 00000800 20 69 6d 61 67 65 20 6d 75 73 74 20 62 65 20 66 | image must be f| 00000810 75 72 74 68 65 72 20 74 6f 20 0a 74 68 65 20 72 |urther to .the r| 00000820 69 67 68 74 2e 20 46 72 6f 6d 20 74 68 69 73 2c |ight. From this,| 00000830 20 77 65 20 73 68 6f 75 6c 64 20 72 65 61 6c 69 | we should reali| 00000840 73 65 20 74 68 61 74 20 74 68 65 20 69 6d 61 67 |se that the imag| 00000850 65 20 70 61 73 73 65 64 20 74 6f 20 0a 74 68 65 |e passed to .the| 00000860 20 6c 65 66 74 20 65 79 65 20 73 68 6f 75 6c 64 | left eye should| 00000870 20 62 65 20 6f 6e 20 74 68 65 20 6c 65 66 74 2c | be on the left,| 00000880 20 61 6e 64 20 74 68 65 20 69 6d 61 67 65 20 66 | and the image f| 00000890 6f 72 20 74 68 65 20 72 69 67 68 74 20 0a 65 79 |or the right .ey| 000008a0 65 2c 20 6f 6e 20 74 68 65 20 72 69 67 68 74 2e |e, on the right.| 000008b0 20 54 68 65 72 65 66 6f 72 65 2c 20 77 65 20 63 | Therefore, we c| 000008c0 61 6e 20 65 78 70 65 63 74 20 66 6f 72 77 61 72 |an expect forwar| 000008d0 64 20 70 72 6f 6a 65 63 74 69 6f 6e 73 20 0a 28 |d projections .(| 000008e0 69 6e 20 66 72 6f 6e 74 20 6f 66 20 74 68 65 20 |in front of the | 000008f0 6d 6f 6e 69 74 6f 72 29 20 74 6f 20 68 61 76 65 |monitor) to have| 00000900 20 74 68 65 20 72 69 67 68 74 20 65 79 65 27 73 | the right eye's| 00000910 20 69 6d 61 67 65 20 61 74 20 74 68 65 20 0a 6c | image at the .l| 00000920 65 66 74 2c 20 61 6e 64 20 74 68 65 20 6c 65 66 |eft, and the lef| 00000930 74 20 69 6d 61 67 65 20 61 74 20 74 68 65 20 72 |t image at the r| 00000940 69 67 68 74 2e 20 54 68 69 73 20 77 69 6c 6c 20 |ight. This will | 00000950 6d 61 6b 65 20 74 68 65 20 6c 69 6e 65 73 20 0a |make the lines .| 00000960 6f 66 20 73 69 67 68 74 20 63 6f 6e 76 65 72 67 |of sight converg| 00000970 65 20 62 65 66 6f 72 65 20 74 68 65 20 73 63 72 |e before the scr| 00000980 65 65 6e 2e 0a 0a 4e 6f 74 65 20 68 6f 77 65 76 |een...Note howev| 00000990 65 72 2c 20 74 68 61 74 20 74 68 65 20 64 69 73 |er, that the dis| 000009a0 74 61 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 |tance between th| 000009b0 65 20 6c 65 66 74 20 61 6e 64 20 72 69 67 68 74 |e left and right| 000009c0 20 69 6d 61 67 65 73 20 0a 73 68 6f 75 6c 64 20 | images .should | 000009d0 6e 6f 74 20 65 78 63 65 65 64 20 74 68 65 20 64 |not exceed the d| 000009e0 69 73 74 61 6e 63 65 20 62 65 74 77 65 65 6e 20 |istance between | 000009f0 65 61 63 68 20 65 79 65 2c 20 6f 74 68 65 72 77 |each eye, otherw| 00000a00 69 73 65 20 74 68 65 20 33 44 20 0a 65 66 66 65 |ise the 3D .effe| 00000a10 63 74 20 69 73 20 6c 6f 73 74 2e 20 49 6e 64 65 |ct is lost. Inde| 00000a20 65 64 2c 20 64 75 65 20 74 6f 20 74 68 65 20 69 |ed, due to the i| 00000a30 6e 61 62 69 6c 69 74 79 20 74 6f 20 65 78 61 63 |nability to exac| 00000a40 74 6c 79 20 6d 61 74 63 68 20 74 68 65 20 0a 63 |tly match the .c| 00000a50 6f 6c 6f 75 72 20 6f 66 20 74 68 65 20 67 6c 61 |olour of the gla| 00000a60 73 73 65 73 2c 20 61 20 73 65 70 61 72 61 74 69 |sses, a separati| 00000a70 6f 6e 20 6f 66 20 61 62 6f 75 74 20 33 32 20 4f |on of about 32 O| 00000a80 53 20 75 6e 69 74 73 20 69 73 20 61 6c 6c 20 0a |S units is all .| 00000a90 77 65 20 63 61 6e 20 65 78 70 65 63 74 2e 0a 0a |we can expect...| 00000aa0 4e 6f 77 20 69 73 20 77 68 65 72 65 20 74 68 65 |Now is where the| 00000ab0 20 67 6c 61 73 73 65 73 20 63 6f 6d 65 20 69 6e | glasses come in| 00000ac0 20 2d 20 73 65 70 61 72 61 74 69 6e 67 20 74 68 | - separating th| 00000ad0 65 20 6c 65 66 74 20 65 79 65 27 73 20 0a 69 6d |e left eye's .im| 00000ae0 61 67 65 20 61 6e 64 20 74 68 65 20 72 69 67 68 |age and the righ| 00000af0 74 20 65 79 65 27 73 2e 20 54 68 65 20 6c 65 6e |t eye's. The len| 00000b00 73 65 73 20 69 6e 20 65 61 63 68 20 65 79 65 20 |ses in each eye | 00000b10 61 72 65 20 61 20 64 69 66 66 65 72 65 6e 74 20 |are a different | 00000b20 0a 63 6f 6c 6f 75 72 20 2d 20 6e 6f 72 6d 61 6c |.colour - normal| 00000b30 6c 79 20 72 65 64 20 61 6e 64 20 67 72 65 65 6e |ly red and green| 00000b40 2c 20 6f 72 20 72 65 64 20 61 6e 64 20 62 6c 75 |, or red and blu| 00000b50 65 2e 20 54 68 65 20 67 6c 61 73 73 65 73 20 49 |e. The glasses I| 00000b60 20 0a 75 73 65 64 20 77 65 72 65 20 72 65 64 20 | .used were red | 00000b70 69 6e 20 74 68 65 20 6c 65 66 74 20 65 79 65 20 |in the left eye | 00000b80 61 6e 64 20 62 6c 75 65 20 69 6e 20 74 68 65 20 |and blue in the | 00000b90 72 69 67 68 74 2e 20 54 68 65 20 73 61 6d 65 20 |right. The same | 00000ba0 0a 67 6c 61 73 73 65 73 20 63 6f 75 6c 64 20 70 |.glasses could p| 00000bb0 6f 73 73 69 62 6c 79 20 62 65 20 6f 62 74 61 69 |ossibly be obtai| 00000bc0 6e 65 64 20 66 72 6f 6d 20 79 6f 75 72 20 6c 6f |ned from your lo| 00000bd0 63 61 6c 20 63 69 6e 65 6d 61 2c 20 61 73 20 0a |cal cinema, as .| 00000be0 74 68 65 79 20 77 65 72 65 20 75 73 65 64 20 66 |they were used f| 00000bf0 6f 72 20 74 68 65 20 66 69 6c 6d 2c 20 22 46 72 |or the film, "Fr| 00000c00 65 64 64 79 27 73 20 44 65 61 64 22 2e 20 41 6e |eddy's Dead". An| 00000c10 79 77 61 79 2c 20 6f 6e 65 20 6c 65 6e 73 20 0a |yway, one lens .| 00000c20 77 69 6c 6c 20 74 6f 74 61 6c 6c 79 20 62 6c 6f |will totally blo| 00000c30 63 6b 20 6f 75 74 20 74 68 65 20 63 6f 6c 6f 75 |ck out the colou| 00000c40 72 20 6f 66 20 74 68 65 20 6f 74 68 65 72 2e 20 |r of the other. | 00000c50 54 68 65 72 65 66 6f 72 65 2c 20 62 79 20 0a 6d |Therefore, by .m| 00000c60 61 6b 69 6e 67 20 74 68 65 20 6c 65 66 74 20 69 |aking the left i| 00000c70 6d 61 67 65 20 74 68 65 20 63 6f 6c 6f 75 72 20 |mage the colour | 00000c80 6f 66 20 74 68 65 20 6c 65 66 74 20 6c 65 6e 73 |of the left lens| 00000c90 2c 20 61 6e 64 20 74 68 65 20 72 69 67 68 74 20 |, and the right | 00000ca0 0a 69 6d 61 67 65 20 74 68 65 20 63 6f 6c 6f 75 |.image the colou| 00000cb0 72 20 6f 66 20 74 68 65 20 72 69 67 68 74 20 6c |r of the right l| 00000cc0 65 6e 73 2c 20 69 74 20 69 73 20 70 6f 73 73 69 |ens, it is possi| 00000cd0 62 6c 65 20 74 6f 20 73 65 70 61 72 61 74 65 20 |ble to separate | 00000ce0 0a 74 68 65 20 70 69 63 74 75 72 65 20 6f 6e 20 |.the picture on | 00000cf0 74 68 65 20 73 63 72 65 65 6e 2e 0a 0a 50 72 6f |the screen...Pro| 00000d00 62 61 62 6c 79 20 74 68 65 20 68 61 72 64 65 73 |bably the hardes| 00000d10 74 20 70 61 72 74 20 6f 66 20 63 72 65 61 74 69 |t part of creati| 00000d20 6e 67 20 61 20 33 44 20 69 6d 61 67 65 20 69 73 |ng a 3D image is| 00000d30 20 66 69 6e 64 69 6e 67 20 74 68 65 20 0a 65 78 | finding the .ex| 00000d40 61 63 74 20 63 6f 6c 6f 75 72 20 6f 66 20 65 61 |act colour of ea| 00000d50 63 68 20 6c 65 6e 73 2e 20 54 68 65 20 73 69 6d |ch lens. The sim| 00000d60 70 6c 65 73 74 20 77 61 79 20 6f 66 20 64 6f 69 |plest way of doi| 00000d70 6e 67 20 74 68 69 73 20 69 73 20 74 6f 20 0a 72 |ng this is to .r| 00000d80 75 6e 20 6c 69 73 74 69 6e 67 20 6f 6e 65 20 28 |un listing one (| 00000d90 66 6f 75 6e 64 20 6f 6e 20 74 68 65 20 66 72 65 |found on the fre| 00000da0 65 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 64 |e subscription d| 00000db0 69 73 63 29 2e 20 49 74 20 77 69 6c 6c 20 0a 69 |isc). It will .i| 00000dc0 6e 69 74 69 61 6c 6c 79 20 64 72 61 77 20 61 20 |nitially draw a | 00000dd0 72 65 64 20 63 69 72 63 6c 65 20 69 6e 20 74 68 |red circle in th| 00000de0 65 20 63 65 6e 74 72 65 20 6f 66 20 74 68 65 20 |e centre of the | 00000df0 73 63 72 65 65 6e 2e 20 50 6c 61 63 65 20 61 20 |screen. Place a | 00000e00 0a 6c 65 6e 73 20 6f 76 65 72 20 69 74 20 61 6e |.lens over it an| 00000e10 64 20 61 6c 74 65 72 20 74 68 65 20 63 6f 6c 6f |d alter the colo| 00000e20 75 72 20 28 77 68 69 63 68 20 69 73 20 64 69 73 |ur (which is dis| 00000e30 70 6c 61 79 65 64 20 61 73 20 74 68 72 65 65 20 |played as three | 00000e40 0a 66 69 67 75 72 65 73 20 61 74 20 74 68 65 20 |.figures at the | 00000e50 74 6f 70 20 6f 66 20 74 68 65 20 73 63 72 65 65 |top of the scree| 00000e60 6e 29 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 |n) by using the | 00000e70 6b 65 79 73 20 61 73 20 64 65 73 63 72 69 62 65 |keys as describe| 00000e80 64 2e 20 0a 57 68 65 6e 20 74 68 65 20 63 69 72 |d. .When the cir| 00000e90 63 6c 65 20 61 70 70 65 61 72 73 20 61 73 20 64 |cle appears as d| 00000ea0 61 72 6b 20 61 73 20 70 6f 73 73 69 62 6c 65 20 |ark as possible | 00000eb0 69 6e 20 6f 6e 65 20 6c 65 6e 73 2c 20 62 75 74 |in one lens, but| 00000ec0 20 69 73 20 0a 73 74 69 6c 6c 20 62 72 69 67 68 | is .still brigh| 00000ed0 74 20 69 6e 20 74 68 65 20 6f 74 68 65 72 2c 20 |t in the other, | 00000ee0 6e 6f 74 65 20 64 6f 77 6e 20 74 68 65 20 63 6f |note down the co| 00000ef0 6c 6f 75 72 20 6e 75 6d 62 65 72 73 20 28 61 6e |lour numbers (an| 00000f00 64 20 0a 77 68 69 63 68 20 6c 65 6e 73 20 69 74 |d .which lens it| 00000f10 20 77 61 73 20 76 69 73 69 62 6c 65 20 69 6e 29 | was visible in)| 00000f20 20 61 6e 64 20 72 65 70 65 61 74 20 77 69 74 68 | and repeat with| 00000f30 20 74 68 65 20 6f 74 68 65 72 20 6c 65 6e 73 2e | the other lens.| 00000f40 20 59 6f 75 20 0a 6d 61 79 20 66 69 6e 64 20 61 | You .may find a| 00000f50 6c 6c 20 74 68 69 73 20 65 61 73 69 65 72 20 69 |ll this easier i| 00000f60 6e 20 61 20 64 61 72 6b 20 72 6f 6f 6d 2e 0a 0a |n a dark room...| 00000f70 41 6e 20 65 78 61 6d 70 6c 65 20 6f 66 20 74 68 |An example of th| 00000f80 65 20 73 6f 72 74 20 6f 66 20 65 66 66 65 63 74 |e sort of effect| 00000f90 20 74 68 61 74 20 63 61 6e 20 62 65 20 61 63 68 | that can be ach| 00000fa0 69 65 76 65 64 20 77 69 74 68 20 74 68 65 20 0a |ieved with the .| 00000fb0 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 64 65 73 63 |information desc| 00000fc0 72 69 62 65 64 20 68 65 72 65 20 63 61 6e 20 62 |ribed here can b| 00000fd0 65 20 73 65 65 6e 20 77 69 74 68 20 6c 69 73 74 |e seen with list| 00000fe0 69 6e 67 20 74 77 6f 20 2d 20 61 20 74 68 72 65 |ing two - a thre| 00000ff0 65 20 0a 64 69 6d 65 6e 73 69 6f 6e 61 6c 20 73 |e .dimensional s| 00001000 74 61 72 20 66 69 65 6c 64 2e 20 43 6c 6f 73 65 |tar field. Close| 00001010 20 61 6c 6c 20 74 68 65 20 63 75 72 74 61 69 6e | all the curtain| 00001020 73 20 61 6e 64 20 64 6f 6f 72 73 20 2d 20 74 68 |s and doors - th| 00001030 65 20 33 44 20 0a 65 66 66 65 63 74 20 63 61 6e |e 3D .effect can| 00001040 20 62 65 73 74 20 62 65 20 73 65 65 6e 20 69 6e | best be seen in| 00001050 20 74 6f 74 61 6c 20 64 61 72 6b 6e 65 73 73 20 | total darkness | 00001060 2d 20 61 6e 64 20 72 75 6e 20 74 68 65 20 70 72 |- and run the pr| 00001070 6f 67 72 61 6d 2e 0a 0a 49 66 20 79 6f 75 20 6f |ogram...If you o| 00001080 77 6e 20 61 20 74 65 6c 65 76 69 73 69 6f 6e 2c |wn a television,| 00001090 20 79 6f 75 20 77 69 6c 6c 20 6e 6f 74 69 63 65 | you will notice| 000010a0 20 61 20 70 6f 6f 72 20 65 66 66 65 63 74 2c 20 | a poor effect, | 000010b0 69 66 20 61 6e 79 2e 20 0a 54 68 65 20 6f 6e 6c |if any. .The onl| 000010c0 79 20 77 61 79 20 74 6f 20 61 76 6f 69 64 20 74 |y way to avoid t| 000010d0 68 69 73 20 69 73 20 74 6f 20 75 73 65 20 61 20 |his is to use a | 000010e0 67 6f 6f 64 20 71 75 61 6c 69 74 79 20 50 41 4c |good quality PAL| 000010f0 20 65 6e 63 6f 64 65 72 2c 20 0a 6f 72 20 75 73 | encoder, .or us| 00001100 65 20 61 20 6d 6f 6e 69 74 6f 72 2e 20 54 68 65 |e a monitor. The| 00001110 20 62 65 74 74 65 72 20 74 68 65 20 71 75 61 6c | better the qual| 00001120 69 74 79 20 6f 66 20 74 68 65 20 6d 6f 6e 69 74 |ity of the monit| 00001130 6f 72 2c 20 74 68 65 20 6d 6f 72 65 20 0a 61 6d |or, the more .am| 00001140 61 7a 69 6e 67 20 74 68 65 20 65 66 66 65 63 74 |azing the effect| 00001150 2e 20 49 66 20 79 6f 75 20 63 61 6e 20 73 65 65 |. If you can see| 00001160 20 27 67 68 6f 73 74 69 6e 67 27 2c 20 74 68 61 | 'ghosting', tha| 00001170 74 20 69 73 20 73 65 65 69 6e 67 20 0a 62 6f 74 |t is seeing .bot| 00001180 68 20 72 65 64 20 61 6e 64 20 62 6c 75 65 20 28 |h red and blue (| 00001190 6f 72 20 77 68 61 74 65 76 65 72 20 63 6f 6c 6f |or whatever colo| 000011a0 75 72 73 20 74 68 65 20 6c 65 6e 73 65 73 20 61 |urs the lenses a| 000011b0 72 65 29 20 6c 69 6e 65 73 2c 20 74 72 79 20 0a |re) lines, try .| 000011c0 6d 6f 76 69 6e 67 20 61 77 61 79 20 66 72 6f 6d |moving away from| 000011d0 20 74 68 65 20 73 63 72 65 65 6e 20 6d 6f 72 65 | the screen more| 000011e0 20 2d 20 6f 6e 20 61 20 67 6f 6f 64 20 6d 75 6c | - on a good mul| 000011f0 74 69 73 79 6e 63 2c 20 69 74 20 69 73 20 0a 70 |tisync, it is .p| 00001200 6f 73 73 69 62 6c 65 20 74 6f 20 73 69 74 20 6e |ossible to sit n| 00001210 6f 72 6d 61 6c 6c 79 20 61 74 20 74 68 65 20 63 |ormally at the c| 00001220 6f 6d 70 75 74 65 72 20 61 6e 64 20 73 74 69 6c |omputer and stil| 00001230 6c 20 73 65 65 20 61 20 63 6c 65 61 72 20 0a 70 |l see a clear .p| 00001240 69 63 74 75 72 65 2e 0a 0a 49 66 20 79 6f 75 20 |icture...If you | 00001250 66 69 6e 64 20 73 74 61 72 73 20 61 20 6c 69 74 |find stars a lit| 00001260 74 6c 65 20 62 6f 72 69 6e 67 2c 20 74 61 6b 65 |tle boring, take| 00001270 20 61 20 6c 6f 6f 6b 20 61 74 20 6c 69 73 74 69 | a look at listi| 00001280 6e 67 20 74 68 72 65 65 2e 20 0a 54 68 69 73 20 |ng three. .This | 00001290 69 73 20 74 68 65 20 73 6f 75 72 63 65 20 63 6f |is the source co| 000012a0 64 65 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 |de to create the| 000012b0 20 6d 6f 64 75 6c 65 20 27 33 44 50 6c 6f 74 4d | module '3DPlotM| 000012c0 6f 64 27 2e 20 54 68 69 73 20 0a 6d 6f 64 75 6c |od'. This .modul| 000012d0 65 20 70 72 6f 76 69 64 65 73 20 6f 6e 65 20 53 |e provides one S| 000012e0 57 49 20 74 68 61 74 20 63 61 6e 20 62 65 20 61 |WI that can be a| 000012f0 63 63 65 73 73 65 64 20 66 72 6f 6d 20 42 41 53 |ccessed from BAS| 00001300 49 43 2c 20 6f 72 20 6d 6f 73 74 20 0a 6f 74 68 |IC, or most .oth| 00001310 65 72 20 6c 61 6e 67 75 61 67 65 73 2e 20 54 68 |er languages. Th| 00001320 69 73 20 66 75 6e 63 74 69 6f 6e 20 61 6c 6c 6f |is function allo| 00001330 77 73 20 33 44 20 76 65 63 74 6f 72 20 67 72 61 |ws 3D vector gra| 00001340 70 68 69 63 73 20 74 6f 20 62 65 20 0a 70 72 6f |phics to be .pro| 00001350 64 75 63 65 64 2c 20 62 79 20 70 61 73 73 69 6e |duced, by passin| 00001360 67 20 74 68 65 20 78 2c 79 20 61 6e 64 20 7a 20 |g the x,y and z | 00001370 63 6f 6f 72 64 69 6e 61 74 65 73 2e 20 54 68 65 |coordinates. The| 00001380 20 61 70 70 72 6f 70 72 69 61 74 65 20 0a 72 65 | appropriate .re| 00001390 64 20 61 6e 64 20 62 6c 75 65 20 73 68 61 70 65 |d and blue shape| 000013a0 73 20 77 69 6c 6c 20 62 65 20 64 72 61 77 6e 2e |s will be drawn.| 000013b0 20 54 6f 20 75 73 65 20 69 74 20 66 72 6f 6d 20 | To use it from | 000013c0 42 41 53 49 43 2c 20 66 6f 72 20 0a 65 78 61 6d |BASIC, for .exam| 000013d0 70 6c 65 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 |ple, you should | 000013e0 65 6e 74 65 72 20 3a 0a 0a 53 59 53 20 22 33 44 |enter :..SYS "3D| 000013f0 5f 50 6c 6f 74 22 2c 70 6c 6f 74 20 61 63 74 69 |_Plot",plot acti| 00001400 6f 6e 2c 78 2c 79 2c 7a 0a 0a 78 2c 79 20 61 6e |on,x,y,z..x,y an| 00001410 64 20 7a 20 61 72 65 20 74 68 65 20 63 6f 6f 72 |d z are the coor| 00001420 64 69 6e 61 74 65 73 20 6f 66 20 74 68 65 20 6c |dinates of the l| 00001430 69 6e 65 2c 20 61 72 63 20 6f 72 20 77 68 61 74 |ine, arc or what| 00001440 65 76 65 72 20 79 6f 75 20 0a 77 69 73 68 20 74 |ever you .wish t| 00001450 6f 20 64 72 61 77 2e 20 54 68 65 20 70 6c 6f 74 |o draw. The plot| 00001460 20 61 63 74 69 6f 6e 20 70 61 72 61 6d 65 74 65 | action paramete| 00001470 72 20 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 |r is the same as| 00001480 20 66 6f 72 20 56 44 55 32 35 20 0a 28 50 6c 6f | for VDU25 .(Plo| 00001490 74 29 2e 20 46 6f 72 20 74 68 6f 73 65 20 6f 66 |t). For those of| 000014a0 20 79 6f 75 20 77 69 74 68 6f 75 74 20 50 52 4d | you without PRM| 000014b0 2c 20 68 65 72 65 27 73 20 61 20 73 75 6d 6d 61 |, here's a summa| 000014c0 72 79 20 6f 66 20 74 68 65 20 0a 63 6f 64 65 73 |ry of the .codes| 000014d0 20 3a 0a 0a 41 6c 6c 20 63 6f 64 65 73 20 63 61 | :..All codes ca| 000014e0 6e 20 62 65 20 65 78 70 72 65 73 73 65 64 20 61 |n be expressed a| 000014f0 73 20 22 3c 62 61 73 65 3e 20 2b 20 3c 61 63 74 |s "<base> + <act| 00001500 69 6f 6e 3e 22 2e 20 74 68 65 20 42 61 73 65 20 |ion>". the Base | 00001510 0a 6e 75 6d 62 65 72 20 74 65 6c 6c 73 20 74 68 |.number tells th| 00001520 65 20 63 6f 6d 70 75 74 65 72 20 77 68 61 74 20 |e computer what | 00001530 73 68 61 70 20 79 6f 75 20 77 69 73 68 20 74 6f |shap you wish to| 00001540 20 64 72 61 77 2e 20 41 63 74 69 6f 6e 20 0a 74 | draw. Action .t| 00001550 65 6c 6c 73 20 74 68 65 20 63 6f 6d 70 75 74 65 |ells the compute| 00001560 72 20 68 6f 77 20 79 6f 75 20 77 61 6e 74 20 74 |r how you want t| 00001570 6f 20 64 72 61 77 20 69 74 2e 20 54 68 65 20 62 |o draw it. The b| 00001580 61 73 65 20 76 61 6c 75 65 73 20 61 72 65 20 0a |ase values are .| 00001590 61 73 20 66 6f 6c 6c 6f 77 73 20 3a 0a 0a 30 20 |as follows :..0 | 000015a0 2d 20 64 72 61 77 20 61 20 6c 69 6e 65 2c 20 6f |- draw a line, o| 000015b0 72 20 6d 6f 76 65 20 74 6f 20 74 68 65 20 70 6f |r move to the po| 000015c0 69 6e 74 0a 36 34 20 2d 20 70 6c 6f 74 20 61 20 |int.64 - plot a | 000015d0 70 6f 69 6e 74 0a 38 30 20 2d 20 64 72 61 77 20 |point.80 - draw | 000015e0 61 20 66 69 6c 6c 65 64 20 74 72 69 61 6e 67 6c |a filled triangl| 000015f0 65 0a 39 36 20 2d 20 64 72 61 77 20 61 20 66 69 |e.96 - draw a fi| 00001600 6c 6c 65 64 20 72 65 63 74 61 6e 67 6c 65 0a 31 |lled rectangle.1| 00001610 31 32 20 2d 20 64 72 61 77 20 61 20 66 69 6c 6c |12 - draw a fill| 00001620 65 64 20 70 61 72 61 6c 6c 65 6c 6f 67 72 61 6d |ed parallelogram| 00001630 0a 31 34 34 20 2d 20 64 72 61 77 20 61 20 63 69 |.144 - draw a ci| 00001640 72 63 6c 65 20 6f 75 74 6c 69 6e 65 0a 31 35 32 |rcle outline.152| 00001650 20 2d 20 64 72 61 77 20 61 20 66 69 6c 6c 65 64 | - draw a filled| 00001660 20 63 69 72 63 6c 65 0a 31 36 30 20 2d 20 64 72 | circle.160 - dr| 00001670 61 77 20 61 6e 20 61 72 63 0a 31 36 38 20 2d 20 |aw an arc.168 - | 00001680 64 72 61 77 20 61 20 73 65 67 6d 65 6e 74 0a 31 |draw a segment.1| 00001690 37 36 20 2d 20 64 72 61 77 20 61 20 73 65 63 74 |76 - draw a sect| 000016a0 6f 72 0a 31 39 32 20 2d 20 64 72 61 77 20 61 6e |or.192 - draw an| 000016b0 20 65 6c 6c 69 70 73 65 20 6f 75 74 6c 69 6e 65 | ellipse outline| 000016c0 0a 32 30 30 20 2d 20 64 72 61 77 20 61 20 66 69 |.200 - draw a fi| 000016d0 6c 6c 65 64 20 65 6c 6c 69 70 73 65 0a 0a 54 68 |lled ellipse..Th| 000016e0 65 20 61 63 74 69 6f 6e 20 76 61 6c 75 65 73 20 |e action values | 000016f0 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 |that should be a| 00001700 64 64 65 64 20 74 6f 20 74 68 65 20 61 62 6f 76 |dded to the abov| 00001710 65 20 62 61 73 65 73 20 61 72 65 20 61 73 20 0a |e bases are as .| 00001720 66 6f 6c 6c 6f 77 73 20 3a 0a 0a 30 20 2d 20 6d |follows :..0 - m| 00001730 6f 76 65 20 72 65 6c 61 74 69 76 65 20 74 6f 20 |ove relative to | 00001740 74 68 65 20 6c 61 73 74 20 70 6f 73 69 74 69 6f |the last positio| 00001750 6e 20 76 69 73 69 74 65 64 20 28 4d 4f 56 45 20 |n visited (MOVE | 00001760 42 59 29 0a 31 20 2d 20 64 72 61 77 20 72 65 6c |BY).1 - draw rel| 00001770 61 74 69 76 65 20 74 6f 20 74 68 65 20 6c 61 73 |ative to the las| 00001780 74 20 70 6f 73 69 74 69 6f 6e 20 76 69 73 69 74 |t position visit| 00001790 65 64 0a 34 20 2d 20 6d 6f 76 65 20 74 6f 20 74 |ed.4 - move to t| 000017a0 68 65 20 67 69 76 65 6e 20 70 6f 73 69 74 69 6f |he given positio| 000017b0 6e 0a 35 20 2d 20 64 72 61 77 20 61 74 20 74 68 |n.5 - draw at th| 000017c0 65 20 67 69 76 65 6e 20 70 6f 73 69 74 69 6f 6e |e given position| 000017d0 0a 0a 43 6f 64 65 73 20 30 20 61 6e 64 20 31 20 |..Codes 0 and 1 | 000017e0 63 61 6e 20 62 65 20 69 6c 6c 75 73 74 72 61 74 |can be illustrat| 000017f0 65 64 20 3a 20 49 66 20 74 68 65 20 6c 61 73 74 |ed : If the last| 00001800 20 70 6f 69 6e 74 20 79 6f 75 20 6d 6f 76 65 64 | point you moved| 00001810 20 0a 28 6f 72 20 64 72 65 77 29 20 74 6f 20 77 | .(or drew) to w| 00001820 61 73 20 34 30 30 2c 36 30 30 20 61 6e 64 20 79 |as 400,600 and y| 00001830 6f 75 20 69 73 73 75 65 64 20 61 20 6d 6f 76 65 |ou issued a move| 00001840 20 62 79 20 28 76 61 6c 75 65 20 30 29 20 0a 31 | by (value 0) .1| 00001850 30 30 2c 2d 32 30 30 20 74 68 65 20 6e 65 77 20 |00,-200 the new | 00001860 70 6f 73 69 74 69 6f 6e 20 77 6f 75 6c 64 20 62 |position would b| 00001870 65 20 35 30 30 2c 34 30 30 2e 0a 0a 41 73 20 61 |e 500,400...As a| 00001880 6e 20 65 78 61 6d 70 6c 65 2c 20 6c 65 74 20 75 |n example, let u| 00001890 73 20 64 72 61 77 20 61 20 6c 69 6e 65 20 66 72 |s draw a line fr| 000018a0 6f 6d 20 33 30 30 2c 36 37 36 2c 33 37 35 20 74 |om 300,676,375 t| 000018b0 6f 20 32 37 34 2c 36 30 37 2c 33 37 34 0a 57 68 |o 274,607,374.Wh| 000018c0 61 74 20 79 6f 75 20 6d 75 73 74 20 64 6f 20 69 |at you must do i| 000018d0 73 20 3a 0a 4d 6f 76 65 20 74 6f 20 6f 6e 65 20 |s :.Move to one | 000018e0 65 6e 64 20 2e 2e 2e 0a 53 59 53 20 22 33 44 5f |end ....SYS "3D_| 000018f0 50 6c 6f 74 22 2c 34 2c 33 30 30 2c 36 37 36 2c |Plot",4,300,676,| 00001900 33 37 35 0a 41 6e 64 20 74 68 65 6e 20 64 72 61 |375.And then dra| 00001910 77 20 61 20 6c 69 6e 65 20 74 6f 20 74 68 65 20 |w a line to the | 00001920 6f 74 68 65 72 20 2e 2e 2e 0a 53 59 53 20 22 33 |other ....SYS "3| 00001930 44 5f 50 6c 6f 74 22 2c 35 2c 32 37 34 2c 36 30 |D_Plot",5,274,60| 00001940 37 2c 33 37 34 0a 0a 54 6f 20 64 72 61 77 20 61 |7,374..To draw a| 00001950 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 20 73 68 | more complex sh| 00001960 61 70 65 2c 20 73 75 63 68 20 61 73 20 61 20 74 |ape, such as a t| 00001970 72 69 61 6e 67 6c 65 2c 20 6d 6f 76 65 20 74 6f |riangle, move to| 00001980 20 74 68 65 20 74 77 6f 20 0a 63 6f 72 6e 65 72 | the two .corner| 00001990 73 20 61 6e 64 20 69 73 73 75 65 20 61 20 38 35 |s and issue a 85| 000019a0 20 28 69 65 2e 20 38 30 20 2b 20 35 29 20 66 6f | (ie. 80 + 5) fo| 000019b0 72 20 74 68 65 20 66 69 6e 61 6c 20 63 6f 72 6e |r the final corn| 000019c0 65 72 2e 0a 0a 4c 69 73 74 69 6e 67 20 66 6f 75 |er...Listing fou| 000019d0 72 20 69 73 20 61 20 66 69 6e 61 6c 20 73 75 6d |r is a final sum| 000019e0 6d 61 72 79 20 6f 66 20 74 68 65 20 69 64 65 61 |mary of the idea| 000019f0 73 20 64 65 73 63 72 69 62 65 64 20 68 65 72 65 |s described here| 00001a00 2e 20 49 74 20 0a 63 6f 6e 74 61 69 6e 73 20 74 |. It .contains t| 00001a10 68 65 20 73 74 61 72 74 2d 66 69 65 6c 64 20 66 |he start-field f| 00001a20 72 6f 6d 20 6c 69 73 74 69 6e 67 20 74 77 6f 2c |rom listing two,| 00001a30 20 61 6e 64 20 61 64 64 73 20 61 20 73 70 69 6e | and adds a spin| 00001a40 6e 69 6e 67 20 0a 70 79 72 61 6d 69 64 20 62 6f |ning .pyramid bo| 00001a50 75 6e 63 69 6e 67 20 62 61 63 6b 77 61 72 64 73 |uncing backwards| 00001a60 20 61 6e 64 20 66 6f 72 77 61 72 64 73 2e 0a 54 | and forwards..T| 00001a70 68 65 20 70 79 72 61 6d 69 64 20 69 73 20 64 72 |he pyramid is dr| 00001a80 61 77 6e 20 69 6e 20 6d 61 63 68 69 6e 65 20 63 |awn in machine c| 00001a90 6f 64 65 20 66 6f 72 20 73 70 65 65 64 2c 20 61 |ode for speed, a| 00001aa0 6e 64 20 75 73 65 73 20 74 68 65 20 0a 33 44 50 |nd uses the .3DP| 00001ab0 6c 6f 74 4d 6f 64 20 66 6f 72 20 74 68 65 20 76 |lotMod for the v| 00001ac0 65 63 74 6f 72 20 67 72 61 70 68 69 63 73 2e 20 |ector graphics. | 00001ad0 4e 6f 74 65 20 74 68 61 74 20 74 6f 20 72 75 6e |Note that to run| 00001ae0 20 74 68 69 73 20 70 72 6f 67 72 61 6d 2c 20 0a | this program, .| 00001af0 79 6f 75 20 6d 75 73 74 20 68 61 76 65 20 74 68 |you must have th| 00001b00 65 20 4d 6f 64 75 6c 65 20 33 44 4c 69 6e 65 73 |e Module 3DLines| 00001b10 20 6c 6f 61 64 65 64 20 2d 20 74 68 69 73 20 63 | loaded - this c| 00001b20 61 6e 20 62 65 20 61 63 68 69 65 76 65 64 20 62 |an be achieved b| 00001b30 79 20 0a 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 69 |y .double-clicki| 00001b40 6e 67 20 6f 6e 20 74 68 65 20 33 44 50 6c 6f 74 |ng on the 3DPlot| 00001b50 4d 6f 64 20 69 63 6f 6e 20 69 6e 20 74 68 65 20 |Mod icon in the | 00001b60 64 65 73 6b 74 6f 70 2e 0a 0a 54 68 65 20 61 70 |desktop...The ap| 00001b70 70 6c 69 63 61 74 69 6f 6e 20 21 33 44 53 65 74 |plication !3DSet| 00001b80 75 70 20 69 73 20 61 20 73 69 6d 70 6c 65 20 70 |up is a simple p| 00001b90 72 6f 67 72 61 6d 20 74 68 61 74 20 64 65 66 69 |rogram that defi| 00001ba0 6e 65 73 20 74 68 65 20 0a 63 6f 6c 6f 75 72 73 |nes the .colours| 00001bb0 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 6c 65 | used for the le| 00001bc0 66 74 20 61 6e 64 20 72 69 67 68 74 20 6c 65 6e |ft and right len| 00001bd0 73 65 73 2e 20 54 68 69 73 20 63 61 6e 20 62 65 |ses. This can be| 00001be0 20 75 73 65 64 20 74 6f 20 0a 61 64 6a 75 73 74 | used to .adjust| 00001bf0 20 74 68 65 20 63 6f 6c 6f 75 72 73 20 74 6f 20 | the colours to | 00001c00 73 75 69 74 20 79 6f 75 20 2d 20 65 76 65 72 79 |suit you - every| 00001c10 6f 6e 65 73 20 65 79 65 73 27 20 73 65 65 20 6c |ones eyes' see l| 00001c20 69 67 68 74 20 61 6e 64 20 0a 63 6f 6c 6f 75 72 |ight and .colour| 00001c30 20 64 69 66 66 65 72 65 6e 74 6c 79 2e 20 52 75 | differently. Ru| 00001c40 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f |n the applicatio| 00001c50 6e 20 61 73 20 6e 6f 72 6d 61 6c 20 62 79 20 64 |n as normal by d| 00001c60 6f 75 62 6c 65 2d 0a 63 6c 69 63 6b 69 6e 67 20 |ouble-.clicking | 00001c70 6f 6e 20 69 74 73 20 69 63 6f 6e 2e 20 54 68 65 |on its icon. The| 00001c80 6e 2c 20 74 6f 20 63 68 61 6e 67 65 20 74 68 65 |n, to change the| 00001c90 20 6c 65 66 74 20 6c 65 6e 73 20 63 6f 6c 6f 75 | left lens colou| 00001ca0 72 2c 20 70 72 65 73 73 20 0a 27 4c 27 2c 20 6f |r, press .'L', o| 00001cb0 72 20 27 52 27 20 74 6f 20 63 68 61 6e 67 65 20 |r 'R' to change | 00001cc0 74 68 65 20 72 69 67 68 74 20 6f 6e 65 2e 0a 54 |the right one..T| 00001cd0 68 65 6e 2c 20 66 6f 6c 6c 6f 77 20 74 68 65 20 |hen, follow the | 00001ce0 69 6e 73 74 72 75 63 74 69 6f 6e 73 20 6f 6e 20 |instructions on | 00001cf0 74 68 65 20 73 63 72 65 65 6e 2e 20 57 68 65 6e |the screen. When| 00001d00 20 79 6f 75 20 65 78 69 74 20 66 72 6f 6d 20 0a | you exit from .| 00001d10 74 68 65 20 70 72 6f 67 72 61 6d 20 28 6e 6f 74 |the program (not| 00001d20 20 62 79 20 70 72 65 73 73 69 6e 67 20 45 73 63 | by pressing Esc| 00001d30 61 70 65 29 2c 20 74 68 65 20 73 65 74 74 69 6e |ape), the settin| 00001d40 67 73 20 79 6f 75 20 68 61 76 65 20 0a 63 68 61 |gs you have .cha| 00001d50 6e 67 65 64 20 77 69 6c 6c 20 62 65 20 73 61 76 |nged will be sav| 00001d60 65 64 20 74 6f 20 64 69 73 63 2e 20 4e 6f 74 65 |ed to disc. Note| 00001d70 20 74 68 61 74 20 74 68 69 73 20 77 69 6c 6c 20 | that this will | 00001d80 6e 6f 74 20 77 6f 72 6b 20 69 66 20 0a 79 6f 75 |not work if .you| 00001d90 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 21 33 44 | are running !3D| 00001da0 53 65 74 55 70 20 66 72 6f 6d 20 61 6e 20 61 72 |SetUp from an ar| 00001db0 63 68 69 76 65 2c 20 69 65 2e 20 66 6f 6c 6c 6f |chive, ie. follo| 00001dc0 77 20 74 68 65 20 0a 69 6e 73 74 72 75 63 74 69 |w the .instructi| 00001dd0 6f 6e 73 20 69 6e 20 74 68 65 20 6d 61 67 61 7a |ons in the magaz| 00001de0 69 6e 65 20 6f 6e 20 68 6f 77 20 74 6f 20 75 6e |ine on how to un| 00001df0 70 61 63 6b 20 74 68 65 20 61 72 63 68 69 76 65 |pack the archive| 00001e00 2e 0a 46 72 6f 6d 20 6e 6f 77 20 6f 6e 2c 20 61 |..From now on, a| 00001e10 6c 6c 20 74 68 65 20 70 72 6f 67 72 61 6d 73 20 |ll the programs | 00001e20 77 69 6c 6c 20 75 73 65 20 74 68 65 73 65 20 73 |will use these s| 00001e30 65 74 74 69 6e 67 73 20 66 6f 72 20 74 68 65 69 |ettings for thei| 00001e40 72 20 0a 63 6f 6c 6f 75 72 73 2e 0a 0a 20 20 4d |r .colours... M| 00001e50 61 6e 79 20 74 68 61 6e 6b 73 20 74 6f 20 56 69 |any thanks to Vi| 00001e60 6e 63 65 6e 74 20 53 61 6e 64 65 72 73 20 61 6e |ncent Sanders an| 00001e70 64 20 74 68 65 20 6c 6f 63 61 6c 20 63 69 6e 65 |d the local cine| 00001e80 6d 61 20 66 6f 72 20 74 68 65 69 72 20 0a 20 20 |ma for their . | 00001e90 74 72 65 6d 65 6e 64 6f 75 73 20 73 75 70 70 6f |tremendous suppo| 00001ea0 72 74 20 66 6f 72 20 74 68 69 73 20 70 72 6f 6a |rt for this proj| 00001eb0 65 63 74 20 61 6e 64 20 74 68 65 69 72 20 68 65 |ect and their he| 00001ec0 6c 70 20 77 69 74 68 20 74 68 65 20 0a 20 20 72 |lp with the . r| 00001ed0 65 73 65 61 72 63 68 20 69 6e 74 6f 20 33 44 20 |esearch into 3D | 00001ee0 74 65 63 68 6e 69 71 75 65 73 2e 0a 0a |techniques...| 00001eed