Chapter 2 – Spheres Within Spheres (Celestial Sphere – X-eyed 3D)Posted: March 17, 2013
The celestial sphere and coordinate positions
Celestial Sphere (3D images), reconstruct a 3D image via the Spectrum
Celestial Sphere (X-eyed 3D), 3D images via your ZX printer
Star Point, find out where a particular star or planet can be found in the sky
Star Tracker, plots a star or planet on a representation of the sky over a 24-hour period.
Celestial Sphere – X-eyed 3D
This second program for producing a 3D image – again of the celestial sphere – uses an entirely different technique. A colour TV plays no specific part in it but the ZX printer does. If a ZX printer is not available, then simply use the printed screen COPY in Figure 2.2 to experiment with.
Figure 2.2 3D Celestial Spheres
Hold the book at reading distance or a little further away and cross your eyes while viewing. The two seperate images should fuse into one, giving a three dimensional picture with depth.
The system involves preparing two separate DRAWings, from two separate viewpoints, of an object appearing to possess depth. When these drawings are placed side by side and viewed by crossing the eyes (hence X-eyed) the two images can be fused into one, producing a striking 3D illusion. It is estimated that about one third of the population can do this trick without undue eyestrain and I hope that around the same percentage of Spectrum users will be able to do it!
As this is the only 3D system not requiring any viewing aid, its inclusion in this book seems justified. The system has the merit (over the TV/colour filter system just discussed) that the viewing material can be of considerable complexity — the problem of overlapping INK images does not arise.
The two COPYs produced via the ZX printer and this program should be laid out with some care (use Figure 2.2 for guidance). The notation in the bottom left corner of each COPY shows the relative position of each drawing. The centres of the two CIRCLES should be between 70mm and 100mm apart — the precise dimension is not critical. What is vital is that the N/S lines running horizontally through each drawing should be parallel. Use a rule to check that this is so before the COPY is firmly fixed to heavy duty white paper with spray mountant.
Viewing the image
The mounted COPYs for viewing should be placed at normal reading distance (or a little further away in a good light) without any shadows on them The COPYs should be looked at squarely — neither tilted nor rotated. Cross your eyes, perhaps using a finger briefly midway between eye and paper and the two images should fuse into one. The system does require that the eyes converge on a midway point but are focused on the drawings. Results are easier to obtain if you don’t over-concentrate. Keep viewing periods brief.
The program is a modification of the 3D Celestial Sphere program. Even if a ZX printer is not available it is well worth keying in – even on the screen, the drawings have a 3D quality as they are PLOTted. If you intend to modify the previous program to produce this version then first delete Lines 20 and 30 and add as a direct command:
BORDER 7: PAPER 7; INK 9: CLS: LIST ENTER
This will clear the distracting magenta PAPER colour which was essential for the previous background colour.
A new Line 20 is entered, containing the DATA for a little figurine POKEd in UDG CHR$ 154. This is FLASHed in the centre of the screen (instead of a letter O) and represents our observer in the middle of the Celestial Sphere. Two ellipses are PLOTted in this program — to represent the horizon and the celestial equator. The latter comes in two versions according to the INPUT in Line 275, ie a righthand (RH) or lefthand (LH) image, and is inclined at 45° to the horizontal. The variables t (tilt) and zx (semi-major axis) control the shape of the ellipse and variable z is fixed for the inclination. Line 500 allows for a COPY to be made or a reRUN of the program for the second COPY via a one-touch INKEY$ command.
9 REM ***********************
10 REM 3D Celestial Sphere – X
11 REM ***********************
20 DATA 24,8,62,93,157,20,20,54: FOR f=0 TO 7: READ a: POKE USR CHR$ 154+f,a: NEXT f
30 PRINT “3D Celestial Sphere – X image”
35 PRINT AT 1,15;”Zn”;AT 21,15;”Nd”;AT 11,5;”N”;AT 11,26;”S”;AT 11,16; FLASH 1; OVER 1;CHR$ 154
40 PRINT AT 4,6;”Ncp”;AT 3,22;”Mer”;AT 19,23;”Scp”
45 PRINT #0; FLASH 1;”Plot horizon”
50 REM ***********************
70 LET a1=128: LET b=80: LET c=79
80 CIRCLE a1,b,c
90 PLOT a1-c,b: DRAW c*2,0
100 PLOT a1,b: DRAW -60,60: DRAW 120,-120
110 FOR f=0 TO PI*2 STEP .02
120 LET x=SIN f*c: LET y=COS f*c/3: PLOT a1+x,b+y
125 NEXT f
259 REM ***********************
260 REM input RH or LH image
261 REM ***********************
275 INPUT “RH or LH image (r/l)? “; LINE c$
276 PRINT AT 21,0;(“RH” AND c$=”r”)+(“LH” AND c$”r”)+” image”
280 IF c$”r” THEN PLOT a1,b: DRAW 10,28: DRAW -20,-56: PRINT AT 7,17;”E”;AT 16,14;”W”
285 IF c$=”r” THEN PLOT a1,b: DRAW -5,28: DRAW 10,-56: PRINT AT 7,15;”E”;AT 16,16;”W”
300 PRINT #0; FLASH 1;”Plot star on celestial equator”
400 LET t=18: LET z=50: LET zx=61
410 IF c$=”r” THEN LET t=30: LET zx=60
420 LET z=1/SIN ((.1+z)/180*PI)
421 LET t=1/SIN ((.1+t)/180*PI)
430 FOR n=0 TO PI*2 STEP .02
440 LET aa=SIN n*zx
450 LET bb=COS n*zx/t+aa/z
460 PLOT INT (a1+aa),INT (b+bb)
470 NEXT n: INPUT “”
499 REM ***********************
500 PRINT #0;”Press c to COPY, n for New image”: PAUSE 0
510 IF INKEY$=”c” THEN COPY : INPUT “”: GO TO 500
9900 REM ***********************
9990 SAVE “3Dsphxx”
The celestial sphere explained
Letter O (our figurine in the previous program) represents an observer in the middle of a sphere. This observer stands on a horizontal plane at the intersection of the N/S and E/W lines. The point above his head is called the zenith (Zn) and below his feet the nadir (Nd). Through him passes a second but vertical plane, called the meridian (Mer), marked N, Zn, S, Nd etc.
The observer can define any point on the sphere in terms of ‘azimuth’ (horizontal) bearing from the north point of the horizon E=90°, S=180°, W=270°, and so on for any intermediate position. The vertical bearing is measured in ‘altitude’ from 0° (horizon) to 90° (zenith). He can also use negative values, eg the nadir’s altitude is -90°. The zenith and nadir are effectively the poles of the horizon coordinate system. All these reference points stay fixed – our observer is quite simply on home ground.
The observer’s sphere of horizon coordinates is shared by a second sphere called the star or celestial sphere. This second sphere is usually inclined to the first (unless our observer resides at the north pole of the Earth!) and has a virtually identical system of measuring angles, but these are called by different names. Our observer resides at a latitude of 45° north so the axis of the celestial sphere (which remains parallel to the Earth’s axis passes through him at this angle marked by the line Np (Ncp in the X-eyed program) and SP (or Scp). The star Polaris marks the north celestial pole in the sky.
Inclined at 90° polar axis is the equatorial plane which cuts through the observer’s E/W lines. In the 3D Celestial Sphere X program, this line is drawn as if by a star rising in the east, reaching its greatest altitude as it crosses the southern meridian and then setting in the west. The Star’s progress continues even when below the observer’s horizon, and 23 hours and 56 minutes later it returns to its starting point. (On the Spectrum this is speeded up to about a minute or so!). This period is used to calculate sidereal (star) time which is 4 minutes adrift from the Earth-based time of 24 hours, so the two return to sychronisation. In this way a different starry sky is presented as the seasons go by.
The star sphere is divided horizontally by a line parallel to the equator called Declination (Dec). It is measured in degrees from 0° (celestial equator) to 90° (celestial pole): south of the celestial equator, the values are negative. The lines running at 90° to the Declination lines are called Right Ascension (RA) and are similar to lines of longitude on Earth but are measured in hours instead of degrees. Each hour of RA equals 15° so that 24 hours equal 360° – a complete circle of the star sphere. Lines of RA are measured from right to left across the sky.
The RA of a star when it crosses the meridian also marks the sidereal time at that moment. This is a point worth remembering. It is only necessary to calculate the sidereal time for the day and hour (using the sidereal time program) to find which stars are due south – use a star atlas for guidance. As the stars (and the Sun, Moon and planets) are at their greatest altitude when on the meridian, they can be seen to best advantage then, particularly through a telescope.