Chapter 6 – The Planets (The Moons of Mars)

Solar System Trek, view the solar system from the skies of any planet on any date
Planetary Ephemeris, trace the planets in the sky for any date
The Moons of Mars, animated presentation of Mars and its moons
Jupiter’s Satellites, identify and name the positions of Jupiter’s four moons on any date
The Rings of Saturn, simulation of Saturn and its rings
Saturn’s Rings, brief outline only
Saturn Draw, a Computer Aided Design
Planets through a Telescope, relative sizes of the planets
Globe-pixel, plots a globe divided at 10° intervals of latitude and longitude
Globe Projection, as before, using lines.

The Moons of Mars

In Gulliver’s Travels, published in 1735, satirical writer Jonathan Swift poked fun at contemporary astronomers by attributing superior instrumentation and discoveries to the mythical people of Laputa. At the same time Swift proved that he was no mean mathematician.

The Laputans discovered (amongst other things) ‘two lesser stars or satellites… revolving about Mars… at a distance of three times and five times the planet’s diameter.. .from the primary’s centre.. .in periods of 10 and 21 hours respectively….’

As the length of the Martian ‘day’ (24hr 37m) was first deduced by Cassini in 1666, Swift was probably fully aware that his fictional nearer moon to Mars would, as seen from the Martian surface, rise in the west and set in the east a few hours later. The second fictional moon would remain virtually fixed in the Martian skies, because the orbital period nearly matched the planet’s rotation period.

142 years later, in 1877, Professor Asaph Hall, using the 26-inch Naval Observatory refractor in Washington DC, turned Swift’s fiction into fact.

He discovered two moons of Mars, the inner moon indeed orbiting the planet faster than the planet’s axial rotation and the outer moon remaining above a given landscape for nearly three Martian days — passing through all its phases from new moon through full moon twice over. The currently recognised synodic orbital period (new moon to new moon) is 7hr 39m for Phobos and 30hr 21m for Deimos.

The screen display
The following program shows most of these factual features in an animated presentation, correct in both scale and relative motion of the three bodies. Incorporated into the display is a unique projection showing the skies as seen from the Red Planet’s surface, together with the changing phases of each moon as they orbit the planet. See Figure 6.4 for a typical display.

Figure 6.4
The positions of Phobos and Deimos are revealed by their shadows as they orbit Mars. Inset is the view from the Martian surface at local noon with the sun due south. Deimos is in the western sky. As in many of the programs in this book, they can only be fully appreciated in animation and colour.

Moons_of_Mars

The viewpoint is from space looking down on the north polar ice cap of Mars. Sunlight shines from the bottom of the screen with the shadow of the globe cast upwards into space. The planet is slowly rotating on its axis as indicated by a flickering line of longitude — the location of our observation post on the surface. Phobos and Deimos orbit the planet and their shadows in turn are cast up the screen into space.

At the bottom right of the screen is the mini-sky projection of the scene from the planet’s surface. The view covers the southern horizon from east to west and the Sun and moons as they pass across the sky, all synchronised to the main display. Inset into the mini-sky projection is the current phase of each moon, marked ‘p’ for Phobos and’d’ for Deimos. Immediately above is indicated the elapse time since the animation started, marked in days and hours.

Phobos and Deimos
The animation starts at a colourful sunset on the first day — Phobos and Deimos are due south and therefore centred in the mini-sky projection. Phobos moves rapidly to the left in overhauling the planet’s rotation and soon sets on the eastern horizon. In contrast, Deimos moves very slowly westwards, remaining in the sky for over 30 Martian hours before setting, being overtaken by the Sun in the process. Phobos will arc across the skies from west to east many times in the days that follow — Deimos only putting in an appearance again at the end of the program RUN.

It is advisable to reRUN the program several times, preferably in colour, to glean the most from the various interacting displays. The following pointers may be of interest.

When an orbiting moon is at the top of the screen, it appears as a fully illuminated disc or full moon. When at the bottom of the screen, between the Sun and Mars, it is said to be a new moon and, because it is effectively unilluminated as seen from Mars, it disappears briefly. If new moon occurs during the Martian daytime then the moon in question will pass briefly near the Sun, as shown on the mini-sky projection. The UDG CHR$ set from CHR$ 144 to CHR$ 159 is defined in the program to show the moons’ phases in 16 steps.

The program RUN time is controlled by the FOR/NEXT n loop in Line 280 and RUNs for 5 days where PI* 10 equals 10 semicircular arcs of planetary rotation STEPped at half hour intervals by STEP PI/24. Test the program with different values instead of 10 and 24 in this line. A RUN longer than 5 days lacks synchronisation for Phobos.

It is also possible to change the size of Mars and the two orbits with the variable scale in Line 110. Currently it is set so as to contain Deimos’s orbit on the Spectrum screen. The variables ‘mars’, ‘ph’ and ‘de’ are the diameter of Mars and the orbital radii of Phobos and Deimos respectively in kilometres, and should not be changed.

10 REM Moons of Mars
20 RESTORE : GO SUB 2000
40 DIM a$(3): DIM d$(13)
50 LET m$=” martian ”
60 LET n$=”Mars Phobos Deimos”
70 LET x=83: LET y=92: LET d=0: LET p=0: LET sky=0: LET sk=1
80 LET h=0
90 LET dd=4.7: LET pp=4.7
100 LET m1=4: LET m2=4
110 LET q=203: LET scale=290
120 LET mars=6790/2/scale
130 LET m=mars-1
140 LET ph=9350/scale
150 LET de=23487/scale
170 BORDER 0: PAPER 0: CLS
180 PRINT AT 12,9;n$;AT 15,22; INK 4;”hour=”;AT 14,22; INK 6;”day =”
190 PRINT PAPER 6; INK 9;AT 16,19;m$+”day “””'”sunlight ^ ^ ^ ^ ^ “; PAPER 2; INK 5;”e–+–s–+–w”
200 LET pa=5: GO SUB 740
220 FOR n=0 TO 9: PRINT PAPER 1;AT n,9;a$: NEXT n
230 OVER 0: CIRCLE x,y,mars
240 FOR n=0 TO PI*2 STEP PI/24
250 PLOT x,y: DRAW INK 2;COS n*m,SIN n*m: NEXT n: PRINT AT 12,5;d$+d$; BRIGHT 1; PAPER 7;AT 10,10;” ”
260 PRINT AT 0,13;n$;CHR$ 127
280 FOR n=0 TO PI*10 STEP PI/24
290 IF h>24 THEN LET h=h-24
300 PRINT AT 15,28;h;” ”
310 BEEP .01,40: LET h=h+.5
320 PRINT AT 14,28;sk-.5;” ”
340 LET cn=COS n: LET cm=cn*m
350 LET sn=SIN n: LET sm=sn*m
360 IF sky/24=INT (sky/24) THEN LET pa=3: GO SUB 740: GO SUB 690
370 GO SUB 850
390 LET dc=COS d: LET ds=SIN d
400 LET pc=COS p: LET ps=SIN p
420 OVER 1: LET ddc=COS dd: LET dds=SIN dd: LET ppc=COS pp: LET pps=SIN pp: LET sky=sky+1
440 LET dx=x+dc*de
450 LET dy=y+ds*de
460 LET px=x+pc*ph
470 LET py=y+ps*ph
490 FOR f=0 TO 1: PLOT x,y: DRAW INK 2;cm,sm: GO SUB 780
500 INK 9
520 PLOT dx,dy
530 DRAW 0,175-dy-(96 AND dyx-13 AND dx<x+13)
540 PLOT px,py
550 DRAW 0,175-py-(96 AND pyx-13 AND px15 THEN LET m1=m1-16
640 IF m2>15 THEN LET m2=0
650 OVER 0: NEXT n
660 PRINT #0; FLASH 1;” Press any key to run again “: PAUSE 0: GO TO 30
690 PRINT AT 16,19;
700 IF skINT sk THEN PRINT PAPER 6; INK 9;m$+”day “: LET pa=5
710 IF sk=INT sk THEN PRINT PAPER 5; INK 9;m$+”nght”: LET pa=1
720 LET sk=sk+.5
740 FOR k=17 TO 20: PRINT PAPER pa;AT k,19;d$: NEXT k
750 INK 9: PLOT 154,9: DRAW 100,0: DRAW 0,30: DRAW -100,0: DRAW 0,-30
760 PRINT BRIGHT 1; PAPER 0; INK 7;AT 20,23;”p d”
770 RETURN
790 INK 9: IF sm<0 THEN PLOT q+cm*4.2,10+ABS sm*2.4: DRAW 0,1
810 IF dds<0 THEN PLOT q+ddc*50,12+ABS dds*20: DRAW 0,1
820 IF pps<0 THEN PLOT q+ppc*50,10+ABS pps*20: DRAW 0,1
830 INK 0: RETURN
850 PRINT PAPER 0; INK 7; BRIGHT 1;AT 20,24;CHR$ (144+ABS m1)+” “+CHR$ (144+m2): RETURN
2010 DATA 0,0,0,12,2,1,12,6,3,12,6,7,12,14,15,12,30,31,28,62,63
2020 DATA 60,126,127,60,126,255,60,126,254,56,124,252,48,120,248
2030 DATA 48,112,240,48,96,224,48,96,192,48,64,128
2050 FOR n=0 TO 15: FOR f=0 TO 1
2060 READ p
2070 POKE USR CHR$ (144+n)+f,p
2080 POKE USR CHR$ (144+n)+7-f,p
2090 NEXT f
2100 READ c: FOR x=2 TO 5
2110 POKE USR CHR$ (144+n)+x,c
2120 NEXT x: NEXT n: RETURN


Chapter 6 – The Planets (Planetary Ephemeris)

Solar System Trek, view the solar system from the skies of any planet on any date
Planetary Ephemeris, trace the planets in the sky for any date
The Moons of Mars, animated presentation of Mars and its moons
Jupiter’s Satellites, identify and name the positions of Jupiter’s four moons on any date
The Rings of Saturn, simulation of Saturn and its rings
Saturn’s Rings, brief outline only
Saturn Draw, a Computer Aided Design
Planets through a Telescope, relative sizes of the planets
Globe-pixel, plots a globe divided at 10° intervals of latitude and longitude
Globe Projection, as before, using lines.

Planetary Ephemeris

There are degrees of accuracy. If you try to key in a more accurate program than the basic ephemeris program below, the length can increase alarmingly. A ten-fold increase in accuracy, say from 10′ (minutes) of arc error to 1′ of arc error may increase the LLISTing size three-fold. Both degrees of accuracy would place a planet in the same telescopic field of an amateur instrument magnifying, say, x 50, if it was pointed at the correct sky coordinates. It would be obvious that the object was a planet as the disc could be seen (with the possible exceptions of Uranus and Neptune — where the apparent star would be seen to move, over a couple of evenings, against the true stellar background, and be revealed as a planet.

There is a further and more pertinent point to consider. In the case of a book or magazine LLISTing which has to be keyed in, you could rapidly reach the situation where it was virtually impossible to debug keying in errors (particularly with complex formulae). This is a major reason for the relative briefness of the LLISTings in this book.

Occultations
Probably the ultimate in ephemeris computations is occultation work (the Moon or a planet passing in front of a star). The (usually professional) astronomer may need to compute the positions of each body with such accuracy that he would also have to INPUT the precise point on the Earth’s surface within a metre or so of where the observation is to be made. Obviously such a program is only suitable for the massive memory of a mainframe or minicomputer rather than a micro like the Spectrum. Perfection is achievable at a price — both of hardware and mathematical expertise.

Having said this, some Spectrum user plus Microdrive will no doubt disprove it! Good luck to him or her. Dedication and single-mindedness could win the day.

Orbital elements
Now to cases and the program which follows. What is its accuracy and where are its shortcomings? First, a comparison with the Solar System Trek program, which would be regarded as relatively inaccurate — merely within a degree or so of the correct positions because only three parameters are used for computation. These are:

  1. Period in years.
  2. Radius of orbit in AU (astronomical units).
  3. Position on orbit at epoch date (1975.0).

Thus, as previously mentioned, only circular orbits of zero inclination to each other are assumed, which is not precisely the case which exists. For greater precision three additional orbital elements must be considered:

  1. Eccentricity of orbit.
  2. Inclination to the ecliptic (Earth’s orbital plane).
  3. Location of ascending node (point where an inclined orbit crosses the ecliptic in a northerly direction).

For this particular program the epoch date has been upgraded to 1980.0 for item 3, and items 4, 5 and 6 are included.

For eccentricity, this program only solves Kepler’s Equation to the first term, for elliptical orbits to an eccentricity of about 0.1. Mars, Mercury and Pluto, in ascending order, have larger values than this, and so their computed positions are more inaccurate than those of other planets.

Finding the planets
If the intention of this program is ultimately to find the planets in the sky, then this presents few problems except for Pluto. In reality Pluto is so faint in stellar terms — about magnitude 14 — that few amateur astronomers have seen or photographed it. A telescope of about 30 cm aperture is needed for visual use and one of about 10 cm aperture when it is being used as a guided camera to record this most elusive object. Pluto is however retained in the program as a matter of general interest, despite a typical error of j° in its computed position. If a telescopic lens of about 60 cm focal length is used on to 35 mm film, Pluto will still be captured on the exposure (if perhaps at the edge of the frame) whilst aiming at the predicted location in the sky produced by the program. One additional reason for Pluto’s large error is its current perihelion passage which effectively exaggerates the program’s shortcomings by placing Pluto behind (to the west) of its true position.

Pertabations
There is an additional factor which has been ignored in the program for the sake of brevity, namely planetary pertabations — the gravitational influence of each planet with the others which pulls a planet from a true path about the Sun. To include the major (and massive) culprits Jupiter and Saturn would increase the LLISTing length at least two-fold, without reference to the remaining seven planets. Notwithstanding these omissions, the program is accurate to within a few minutes of RA (time) and Dec (arc), especially for planets other than Mercury and Pluto.

RUNning the program
Once the program has been keyed in and is RUNning, the results should be checked against the sample screen displays, Figures 6.2 and 6.3. These should match precisely for the dates shown. With regard to the RA and Dec noted in s (seconds of time) and ” (seconds of arc) respectively, these should be assumed as icing on the cake for, as I’ve already pointed out, the program accuracy does not approach this level. However, it does not reach the absurd situation of some ephemeris programs, which imply such levels of accuracy that you are required to INPUT the hour and minute of the day, in addition to the date, when the predicted errors exceed a day’s movement of the planet concerned against the star background.

Figure 6.2
The planetary positions on the summer solstice, 1985.

Planetary_Ephemeris_210685

Figure 6.3
The planetary position on Christmas Day, 2014

Planetary_Ephemeris_251214

Using star atlases
To be of practical use, particularly if you are unfamiliar with the night sky, the predicted positions should be plotted on a star atlas like Norton or Virion. The latter is printed to a larger scale and is more suitable if used with a small telescope.

To confuse matters a little, each atlas is prepared for a different epoch. This means that the reference grids of RA and Dec are very slightly different, as would be the apparent positions as plotted. In practice, the computed errors may exceed the difference of the reference grid between 1950.0 for Norton and 2000.0 for Tirion — the relevant epoch dates.

Checking on the past
Once you have INPUT a few current dates, and perhaps COPYed them to the ZX printer if you have this option, try entering some dates from the past. The program remains accurate to around one degree over several centuries. The principle errors are caused because we have not allowed for the pertabation effects. If the INPUT date is before the 15th October 1582 then add 10 days to the date to bring it into line with the current (Gregorian) calendar (see Chapter 1).

The following exercise relating to historical dates may be of interest. Test them against the program to find out where certain planets were on these dates using a star atlas for guidance.

INPUT these dates:

1610 January 10 : Galileo discovers moons of Jupiter (approximate date).
1610 February 8 : Undiscovered Uranus in Jupiter’s star field.
1659 November 28 : Huyghens discovers Syrtis Major landmark on Mars at 7pm that evening. Mars’s rotation accurately known to 150 second aided by this observation.
1781 March 13 : Herschel discovers Uranus.
1846 September 23: Galle discovers Neptune in place predicted by Adams and Le Verrier from pertabations on Uranus.
1930 February 10 : Tombaugh discovers Pluto after 10-year search.

It is purely coincidental that the above events, (except for Neptune in Aquarius) occur in Taurus and (for Pluto) in adjacent Gemini. It is interesting to wonder if Galileo with his relatively poor-quality telescope could have discovered Uranus 170 years before Herschel, as some historians suggest. Many famous astronomers between the respective dates observed Uranus and recorded it as a star. Only Herschel with his superior reflector telescope immediately recognised a tiny disc that moved over the following evenings against the star background.

Thus it can be demonstrated that the program can be of practical value in finding the planets in the sky and is of some interest in a historical context. Historians have also suggested that the Star of Bethlehem could have been one of three possibilities:

  • A new star or nova.
  • A comet.
  • A conjunction of bright planets.

Item c can be tackled by the program although it is not ideally suited, as it is a matter of trial and error to find a convenient conjunction (grouping together) of at least three bright planets for a given date. The four brightest planets are Venus, Mars, Jupiter and Saturn — Jupiter must be one of the candidates. Negative dates can be INPUT, like -11 which represents the year 12BC.

A better solution to this type of problem is to rewrite the program using FOR/NEXT loops and/or incremental days to PRINT to the screen when conjunctions occur, starting at a set date — say January 1 10BC until January 1 10 AD. Any pair of planets which form a suitable conjunction should be within about 1° of each other.

10 REM Planetary Ephemeris
30 GO SUB 2000
50 BORDER 0: PAPER 5: INK 9: CLS : PRINT PAPER 4;” Planetary Ephemeris “;CHR$ 127;” ”
60 PRINT ” PAPER 6;b$
70 FOR f=1 TO 8: PRINT PAPER 6;b$: PRINT a$(f*7-6 TO f*7)
80 NEXT f
90 PRINT PAPER 1;AT 4,0;”Planet Right Ascen.Declination”
110 GO SUB 1000
130 LET we=98.83354
140 LET ee=.016718
150 LET z=cd*ed/1.00004: GO SUB 770: LET ne=z
160 LET z=ne+we-102.596403: GO SUB 770: LET me=z
170 LET z=ne+rr*.016718*SIN (me/ra)+we: GO SUB 770: LET le=z
180 LET ve=le-102.596403
190 LET re=(1-ee^2)/(1+ee*COS (ve/ra))
220 FOR n=1 TO 8
230 LET z=cd*ed/x(1,n): GO SUB 770: LET np=z
240 LET mp=np+x(2,n)-x(3,n)
250 LET z=np+rr*x(4,n)*SIN (mp/ra)+x(2,n): GO SUB 800: LET lp=z
260 LET vp=lp-x(3,n)
270 LET rp=x(5,n)*(1-x(4,n)*x(4,n))/(1+x(4,n)*COS (vp/ra))
280 LET psi=ra*ASN (SIN ((lp-x(7,n))/ra)*SIN (x(6,n)/ra))
290 LET yx=lp-x(7,n)
300 LET y=SIN (yx/ra)*COS (x(6,n)/ra)
310 LET x=COS (yx/ra)
320 LET ct=ra*ATN (y/x)
330 LET q=ct: GO SUB 820: LET ct=q
340 LET l1=ct+x(7,n)
350 LET r1=rp*COS (psi/ra)
360 IF n>2 THEN GO TO 430
380 LET ll=le-l1
390 LET a=ra*ATN ((r1*SIN (ll/ra))/(re-r1*COS (ll/ra)))
400 LET z=180+le+a: GO SUB 800: LET lam=z
410 GO TO 470
430 LET ll=l1-le
450 LET z=l1+ra*ATN ((re*SIN (ll/ra)/(r1-re*COS (ll/ra)))): GO SUB 800: LET lam=z
470 LET bet=ra*ATN (r1*TAN (psi/ra)*SIN ((lam-l1)/ra)/(re*SIN ((l1-le)/ra)))
490 LET la=lam/ra
500 LET ec=23.441884/ra
510 LET be=bet/ra
520 LET y=SIN la*COS ec-TAN be*SIN ec: LET x=COS la
530 LET rh=ra*ATN ((SIN la*COS ec-TAN be*SIN ec)/(COS la))
550 LET q=rh: GO SUB 820: LET rh=q
570 LET rx=rh/15: LET ry=INT rx
590 PAPER 5: PRINT AT n*2+3,9;
600 PRINT (“0” AND ry<10);ry;”h “;
610 LET mx=60*(rx-INT rx): LET my=INT mx: PRINT (“0” AND my<10);my;”m “;
620 LET sx=INT (60*(mx-INT mx)+.5): PRINT (“0″ AND sx<10);sx;”s”
630 LET dc=ra*ASN (SIN be*COS ec+COS be*SIN ec*SIN la)
640 PRINT AT n*2+3,21;
650 IF dc=0 THEN PRINT “+”;
670 LET dc=ABS dc
680 PRINT (“0” AND ABS dc<10);INT dc;CHR$ 130;
690 LET dm=60*(INT ABS dc-ABS dc)
700 PRINT (“0” AND ABS dm<10);INT ABS dm;CHR$ 39;
710 LET ds=60*(INT ABS dm-ABS dm)
720 PRINT (“0” AND ABS dsc)+(c AND z<0): RETURN
830 IF x0 THEN RETURN
850 LET q=q+c: RETURN
1010 INPUT “Date yyyy,mm,dd”;TAB 5;y;TAB 10;m;TAB 13;d
1020 IF m12 OR d>31 THEN GO TO 1010
1030 LET m$=”JanFebMarAprMayJunJulAugSepOctNovDec”: LET m$=” “+m$(m*3-2 TO m*3)+” ”
1040 LET d$=STR$ y+m$+STR$ d
1050 INPUT (d$+”-is date OK (y/n)? “); LINE q$
1060 IF q$=”n” THEN GO TO 1000
1070 PRINT PAPER 7;AT 2,9;”Date=”;d$
1110 LET j=INT (365.25*(y-(m<3)))+INT (30.6001*(m+1+12*(m<3)))+d-INT (y/100)+INT (INT (y/100)/4)+1720996.5: LET ed=j-2444238.5
1130 RETURN
2010 REM period in years
2020 DATA .24085,.61521,1.88089,11.86224,29.45771,84.01247,
164.79558,250.9
2030 REM longitude at epoch
2040 DATA 231.2973,355.73352,126.30783,146.966365,165.322242,
228.070855,260.3578998,209.439
2050 REM longitude perihelion
2060 DATA 77.1442128,131.2895792,335.6908166,14.0095493,
92.6653974,172.7363288,47.8672148,222.972
2070 REM eccentricity
2080 DATA .2056306,.0067826,.0933865,.0484658,.0556155,
.0463232,.0090021,.25387
2090 REM major semi-axis
2100 DATA .3870986,.7233316,1.5236883,5.202561,9.554747,
19.21814,30.10957,39.78459
2110 REM inclination
2120 DATA 7.0043579,3.394435,1.8498011,1.3041819,2.4893741,
.7729895,1.7716017,17.137
2130 REM ascending node
2140 DATA 48.0941733,76.4997524,49.4032001,100.2520175,
113.4888341,73.8768642,131.5606494,109.941
2160 LET a$=”MercuryVenus Mars JupiterSaturn Uranus NeptunePluto ”
2180 DIM x(7,8): FOR n=1 TO 7
2190 FOR f=1 TO 8: READ x(n,f)
2200 NEXT f: NEXT n: DIM b$(32)
2220 LET c=360: LET cd=c/365.2422: LET ra=180/PI: LET rr=c/PI
2230 RETURN


Chapter 5 – Solar System Orbits (Solar Apex)

Orrery, simulates the scale and relative movement of the planets about the Sun
Bode’s Law
Kepler’s Orbits, demonstrates the first two of Kepler’s Laws
Orbit Foci, plotting the second focus
Comet Orbit, eccentric orbits
Halley’s Comet, depicts one complete orbit, 1948-2023
Pluto’s Orbit, plots the relative positions of Pluto and Neptune from 1880-2128, one complete orbit for Pluto
Solar Apex, corkscrew motion of a planet towards the Solar Apex.

Solar Apex

Even as you sit quietly at your Spectrum, you and, I hope, the whole room are moving rapidly across the universe. Nor are you moving constantly in a given direction but in a whole series of loops and whirling spirals. This series would read:

  1. Rotation about the Earth’s axis.
  2. Earth’s rotation about Earth/Moon axis.
  3. Earth’s rotation about the Sun.
  4. Sun’s rotation about the galaxy.
  5. Galaxy’s rotation about the Local Group of Galaxies (LG of G).
  6. LG of G rotation about the Virgo Super Cluster of Galaxies (VSCG).
  7. VSCG rotation about the universe.

Most astronomers and cosmologists theorise in this way, but categories 5 and 6 are pure speculation and category 7 improbable under currently accepted theories of the universe’s creation which conform to the idea of a Big Bang, where all groups of galaxies are still moving apart from the initial explosion. Of course if the universe is ‘closed’ and the galaxies finally come to rest they will probably reverse their motion back to the point of the Big Bang – in which case the galaxies are in orbit about this point even if their motion is in a straight line there and back (a maximum of one orbit only). A case of a shell falling back into the muzzle that fired it!

Down to Earth
The following program is a little less rarified and combines categories 3 and 4 to show the corkscrew motion of a planet towards a point in the sky, near the star Vega, called the Solar Apex. This is the direction in space in which the Sun is moving at a speed of 275 km/sec as it orbits our galaxy. The Sun is the straight line trace across the screen and the helical trace that of the planet, the orbit of which can be tilted at an angle for effect.

The various helices as PLOTted have a modest three-dimensional quality to them. Figure 5.13 is a typical example.

The two INPUT conditions control the orbit tilt, 1 for near edge-on, 10 for plan view whilst the planet INPUT alters the orbit radius. The period displayed is purely arbitrary and is controlled by the orbit radius merely to indicate that the helix will be finer and will occur in a shorter period of time on a smaller orbit.

Solar_Apex

5 BORDER 0: PAPER 0: INK 9
10 CLS : PRINT “Solar Apex”,
15 PRINT “tilt =”;
20 INPUT “1 to 10″,z: PRINT z
25 PRINT ,”planet=”;
30 INPUT “1 to 5″,d: PRINT d,”period=”;: LET d=d*10: LET x=100
40 FOR f=0 TO PI*9 STEP .1
45 PRINT AT 2,23;INT (d*f)
50 LET a=x-f*5+x: LET b=f*3+d
60 PLOT INK 6; OVER 1;a,b
70 PLOT INK 4;a+SIN f*d,b+COS f*d/z
80 NEXT f

***NB the keen-eyed among you will notice that the ‘Period’ label in the image is located in the wrong place. This is because the code for this in Line 30 should read: …PRINT d’,”period=”;… not as shown in the listing. This is my mistake not the author’s.


Chapter 5 – Solar System Orbits (Pluto’s Orbit)

Orrery, simulates the scale and relative movement of the planets about the Sun
Bode’s Law
Kepler’s Orbits, demonstrates the first two of Kepler’s Laws
Orbit Foci, plotting the second focus
Comet Orbit, eccentric orbits
Halley’s Comet, depicts one complete orbit, 1948-2023
Pluto’s Orbit, plots the relative positions of Pluto and Neptune from 1880-2128, one complete orbit for Pluto
Solar Apex, corkscrew motion of a planet towards the Solar Apex.

Pluto’s Orbit

On 21st January 1979, Pluto relinquished to Neptune the dubious honour of being the most remote planet from the Sun by crossing within Neptune’s orbit. Pluto will regain the ‘title’ in March 1999 by once more crossing Neptune’s orbit — this time in an outward direction.

A collision between the two planets is unlikely as Pluto’s orbit is inclined 17° to the general plane of the planets including Neptune. During this twenty-year period, Pluto will pass up to 10 AU (10 astronomical units = 10 x Earth to Sun distance) above Neptune’s orbit — a gap almost big enough to contain the complete orbit of the giant planet Jupiter. The planets Pluto and Neptune are themselves well separated — Neptune last overtook Pluto in the 1890s as each moved ponderously along its orbital track in periods of 165 years and 248 years respectively.

Screen display
The following program PLOTs to scale the relative positions of Pluto and Neptune from the year 1880 to 2128 — one complete orbit for Pluto. Both a plan and a section are displayed of the overlapping orbits, with a tiny flashing CIRCLE in the centre representing the Earth’s orbit (at the very centre of which is, of course, the Sun). The passing years are recorded in the top right of the screen and Pluto is PLOTted in a green pixel (a darker shade in monochrome) on a black background (PAPER 0: BORDER 0:) for clarity. The display PAUSEs briefly to PRINT six significant comments against specific dates relevant to the progress of the two planets.

Pluto’s elliptical orbit
Neptune’s orbit has the lowest eccentricity of all the planets, being a near-perfect circle. Because of this, its program requirements are minimal — just Line 340 both to calculate and PLOT its orbit, where variable f is used to increment the PLOT position.

In contrast, the bulk of the program from Line 110 is used to calculate Pluto’s elliptical orbit, which has the highest eccentricity of the major planets with a value of 0.25. Pluto moves faster when closest to the Sun (by wider spacing of the PLOT positions) but, because this presentation is to scale and overlaps Neptune’s orbit, it may not be obvious at this time.

Lines 300 and 310, both of which PLOT Pluto’s orbital progress, appear almost identical except for the expression at the end of Line 310:

“…y/200 + 10 ”

where /200 effectively compresses the y or vertical axis by a factor of 200 so that, instead of a second full ellipse being PLOTted, it is reduced to a near edge-on view of the orbit as shown in the lower part of the display.

Experiments with Pluto display
Once the program has been RUN a few times, using the screen COPY (Figure 5.12) to check that it works correctly, SAVE the program on tape. Now try changing some of the variables to see what effect it has. (These amendments will invariably corrupt an accurate presentation which is why the program should be SAVEd first.)

Figure 5.12
The orbits of Pluto and Neptune from two viewpoints.

Plutos_Orbit

The following variables can be tested for effect:
xx   x coordinate (horizontal) of the Sun
yy   y coordinate (vertical) of the Sun
f     position and increment steps to PLOT Neptune (Lines 110 and 340)
h    STEP value to main FOR/NEXT loop
t     FOR/NEXT main loop starting at value 0 (3 o’clock start)
w    relative eccentricity of Pluto’s orbit

The value 13 (Lines 300 and 310) and the value 55 (Line 340) control the radius of each planet’s orbit.

10 REM Pluto’s Orbit
20 LET t=0: BORDER 0: PAPER 0: INK 7: CLS : GO SUB 400
30 PRINT INK 5;”Pluto’s Orbit”
40 PRINT AT 11,0;”plan”;TAB 16;”Sun”;TAB 25; INK 5;”Pluto”
50 PRINT AT 15,14;”Neptune”
60 PRINT ”””edge-on”‘” view”
70 LET xx=140: LET yy=92
80 PLOT xx-55,0: DRAW 110,20,.1: DRAW -110,-20,.1
90 CIRCLE FLASH 1;xx,yy,2
100 CIRCLE FLASH 1;xx,10,2
110 LET f=12.3: LET w=28.7
120 LET h=.8: LET g=1e6
130 LET x=g/1000: LET y=0
140 LET i=h/4: LET v=0
150 LET r=x: LET s=y
160 LET x=x+i*v: LET y=y+i*w
170 GO SUB 260
180 LET x=r: LET y=s: LET o=h/2
190 LET v=v+o*b: LET w=w+o*c
200 GO SUB 300
210 FOR t=0 TO 155 STEP h
220 LET x=x+h*v: LET y=y+h*w
230 GO SUB 260
240 LET v=v+h*b: LET w=w+h*c
250 GO SUB 300: NEXT t: STOP
260 LET e=x*x+y*y: LET d=SQR e
270 LET a=-g/e: LET b=a*x/d
280 LET c=a*y/d: RETURN
300 PLOT INK 4;x/13+xx,y/13+yy
310 PLOT INK 4;x/13+xx,y/200+10
320 LET tt=1880+INT (t*1.6): PRINT AT 0,20;”year=”;tt
340 PLOT BRIGHT 1;xx+COS f*55,yy+SIN f*55: LET f=f+.05
360 IF tt=1888 OR tt=1929 OR tt=1979 OR tt=1999 OR tt=2040 OR tt=2127 THEN GO SUB 500
370 RETURN
410 LET b$=”1889 – Neptune ‘overtakes’ Pluto”
420 LET c$=”1930 – Pluto discovered”
430 LET d$=”Pluto inside Neptune’s orbit Jan 1979″
440 LET e$=”Pluto outside Neptune’s orbit Mar 1999″
450 LET f$=”Neptune completes orbit: 164 yrs”
460 LET g$=”Pluto completes orbit: 248 yrs”
470 DIM a$(40): RETURN
500 PRINT BRIGHT 1;AT 1,0;(b$ AND tt=1888)+(c$ AND tt=1929)+
(d$ AND tt=1979)+(e$ AND tt=1999)+(f$ AND tt=2040)+
(g$ AND tt=2127)
510 PAUSE 250: PRINT AT 1,0;a$: RETURN


Chapter 5 – Solar System Orbits (Halley’s Comet)

Orrery, simulates the scale and relative movement of the planets about the Sun
Bode’s Law
Kepler’s Orbits, demonstrates the first two of Kepler’s Laws
Orbit Foci, plotting the second focus
Comet Orbit, eccentric orbits
Halley’s Comet, depicts one complete orbit, 1948-2023
Pluto’s Orbit, plots the relative positions of Pluto and Neptune from 1880-2128, one complete orbit for Pluto
Solar Apex, corkscrew motion of a planet towards the Solar Apex.

Halley’s Comet

Halley’s Comet is without doubt the most famous comet of all time and, as a visit to our part of the solar system is due shortly, a program would not be inappropriate.

1066 and all that
Edmund Halley (1656 – 1742) did not discover this comet but was the first to notice that the bright comets seen in 1531,1607 and 1682 had practically identical orbital data and were one and the same object reappearing in the skies about every 75 years.

Halley’s Comet can now be traced back to 611 BC, via Chinese records, but perhaps the most famous reference of all in European history is its depiction in the Bayeux Tapestry of 1066 with the inscription of INTIMIRANT STELLA. Every return of the Comet since King Harold’s reign has been recorded and this is most unusual as the longevity of comets is measured in hundreds rather than thousands of years. This indicates that Halley’s Comet is a substantial body able to survive repeated visits to the inner solar system and the relatively great heat radiated upon it from the Sun.

You should be asking the question: How do comets survive repeated crossings of all the planets without collison? Well, comets (or rather, the survivors after over 5000 million years) have learned to avoid the orbital plane which all planets occupy with highly-inclined orbits. The comet crosses this danger zone for only a few days each perihelion passage.

The program
The program depicts one complete orbit of Halley’s Comet beginning in 1948 _ the year the Comet started its current journey towards both Earth and Sun from beyond the orbit of Neptune. The Comet will return to this aphelion position again in about 2023. The perihelion passage occurs on 10th February 1986 and the program PAUSEs briefly at this point. (See Figure 5.11.) During mid-November 1985 the comet is a binocular object below the Pleiades.

This program is a variation of the Comet Orbit program, but uses one specific orbit produced by the line LET w = 4.5. Again, only one half of the orbit is computed and PLOTted — the inward journey — but each x and y coordinate position is entered into two arrays, x(t) and y(t). These are then used in a second FOR/NEXT loop to PLOT the Comet’s journey back into deep space.

It is necessary to add PAUSE 10 to this second FOR/NEXT loop to slow the PLOTting down to the same speed as the first loop. This indicates the rapidity with which the Spectrum can PLOT pixel positions once the actual position has been computed and SAVEd in an array. Try pressing any key to cancel the PAUSE statement to see what happens.

Screen display
At the top of the screen is denoted the current year against the Comet’s progress — the Comet itself is PLOTted in a different coloured pixel for the inward and outward journeys (for clarity) using inverse graphics on a black screen (BORDER 0: PAPER 0: INK 9).

Figure 5.11
The path of Halley’s comet over a 75-period. Closest approach to the Sun occurs in February 1986.

Halleys_Comet

10 REM Halley’s Comet
20 BORDER 0: PAPER 0: INK 7: CLS : PAPER 5: INK 9
30 PRINT ” Halley’s Comet year= “; FLASH 1;” ”
40 PAPER 1
50 PRINT AT 11,1;”Sun”
60 PLOT 40,80: GO SUB 390
70 PAPER 5
80 LET w=4.5
90 DIM x(170): DIM y(170)
100 LET h=.212: LET g=1e6
110 LET x=g/1e3: LET y=0
120 LET i=h/4: LET v=0
130 LET r=x: LET s=y: LET z=0
140 LET x=x+i*v: LET y=y+i*w
150 GO SUB 230
160 FOR t=1 TO 170
170 LET yr=1948+INT (t/4.5)
180 PRINT AT 0,26;yr
190 LET x=x+h*v: LET y=y+h*w
200 GO SUB 230
210 LET v=v+h*b: LET w=w+h*c
220 GO SUB 260: NEXT t: STOP
230 LET e=x*x+y*y: LET d=SQR e
240 LET a=-g/e: LET b=a*x/d
250 LET c=a*y/d: RETURN
260 PLOT INK 4;40+x/5,y/5+80
270 LET x(t)=x/5: LET y(t)=y/5
280 IF y<0 THEN GO TO 300
290 RETURN
300 PLOT OVER 1;40+x/5,y/5+80
310 PRINT #0; FLASH 1;” Comet at perihelion passage ”
320 PAUSE 300: INPUT “”
330 FOR t=169 TO 1 STEP -1
340 LET yr=2023+INT (-t/4.5)
350 PRINT AT 0,26;yr
360 PLOT INK 6;40+x(t),-y(t)+80
370 PAUSE 10: NEXT t: STOP
390 CIRCLE 40,80,8
400 CIRCLE 40,80,40
410 FOR n=1 TO 3: READ a,b: PLOT 40+a,20: DRAW 0,120,b: NEXT n
420 PRINT AT 13,1;”Earth”
430 PRINT AT 18,1;”Jupiter Saturn Uranus Neptune”: RETURN
440 DATA 40,2,105,1.1,160,.9


Chapter 5 – Solar System Orbits (Comet Orbit)

Orrery, simulates the scale and relative movement of the planets about the Sun
Bode’s Law
Kepler’s Orbits, demonstrates the first two of Kepler’s Laws
Orbit Foci, plotting the second focus
Comet Orbit, eccentric orbits
Halley’s Comet, depicts one complete orbit, 1948-2023
Pluto’s Orbit, plots the relative positions of Pluto and Neptune from 1880-2128, one complete orbit for Pluto
Solar Apex, corkscrew motion of a planet towards the Solar Apex.

Comet Orbit

This program is the second variation of Kepler’s Orbits. This time we’re dealing with highly eccentric orbits which can usually be ascribed to comets and meteor streams. It is generally recognised that regular meteor displays (shooting stars in the Earth’s atmosphere), like the Perseids in August of each year, are the debris from comets, strewn along each comet’s orbit.

The program allows INPUT values from 0.5 (a highly eccentric orbit, essentially of two parallel lines) to 17 (a full oval) filling the Spectrum screen (see Figure 5.10). To avoid the erroneous if interesting effects of calculating the cometary position close to the Sun, only half the orbit is PLOTted. The lower half of the orbit is a mirror image of the upper portion — Lines 200 and 210 coping with their respective halves. The program STOPs when y becomes negative (once the half orbit is computed).

Figure 5.10
Two extremes of cometary orbit in plan view from full oval to highly eccentric as sample INPUTS.

Comet_Orbit_15

Comet_Orbit_0-5

The program demonstrates very effectively Kepler’s 2nd law of Orbital/ Planetary Motion (see the Kepler’s Orbits program) in the way in which a comet spends most of its time moving very slowly whilst remote from the Sun and only bursts into activity at perihelion passage, as it is called.

10 PRINT “Comet Orbit “;
30 INPUT “Value (.5 to 17): “;w
35 PRINT w’ PAPER 5;”Perihelion
Aphelion”
40 PRINT AT 11,0;”Sun”: CIRCLE 40,83,1
50 LET h=.2: LET g=1e6
60 LET x=g/1e3: LET y=0
70 LET i=h/4: LET v=0
80 LET r=x: LET s=y: LET z=0
90 LET x=x+i*v: LET y=y+i*w
100 GO SUB 160
110 FOR t=0 TO 300
120 LET x=x+h*v: LET y=y+h*w
130 GO SUB 160
140 LET v=v+h*b: LET w=w+h*c
150 GO SUB 190: NEXT t: STOP
160 LET e=x*x+y*y: LET d=SQR e
170 LET a=-g/e: LET b=a*x/d
180 LET c=a*y/d: RETURN
190 IF y<0 THEN STOP
200 PLOT 40+x/5,y/5+83
210 PLOT 40+x/5,-y/5+83
220 RETURN


Chapter 5 – Solar System Orbits (Orbit Foci)

Orrery, simulates the scale and relative movement of the planets about the Sun
Bode’s Law
Kepler’s Orbits, demonstrates the first two of Kepler’s Laws
Orbit Foci, plotting the second focus
Comet Orbit, eccentric orbits
Halley’s Comet, depicts one complete orbit, 1948-2023
Pluto’s Orbit, plots the relative positions of Pluto and Neptune from 1880-2128, one complete orbit for Pluto
Solar Apex, corkscrew motion of a planet towards the Solar Apex.

Orbit Foci

In the previous program, Kepler’s Orbits, reference is made to the Sun being at one focus of an elliptical orbit. Where is the second or ’empty’ focus as it is called?

Quite simply it is at an equal distance measured from the Sun to the perihelion position (the nearest point in orbit to the Sun) but transferred to the aphelion position (remotest point in orbit to the Sun). If you have already keyed in the Kepler’s Orbits program, then the minor modifications from Line 300 in this program are all that is necessary before RUN-ning the revision. This version will PLOT the second focus position once a half-orbit is PLOTted and the position of perihelion is known. Figure 5.9 demonstrates.

Figure 5.9
The program plots the second, or empty, focus (f2) of any selected elliptical orbit. The Sun is at the first focus (f1).

Orbit_Foci

This program is quite important in demonstrating that the Spectrum, via the program, is PLOTting a true elliptical orbit. There is a simple test to check results. RUN the program and measure, either on the video screen or a paper COPY if you have access to the ZX printer, the total distance around a triangle formed between any point on the orbit and the two foci. No matter what point you choose on a given orbit the total distance will be the same.

You are following the same procedure, in reverse, as the gardener who insists on making perfect oval (ie elliptical) flower beds in a lawn. He uses two stakes (representing the two foci) and a loop of string about them drawn taut (representing your triangle) to trace out the shape. Quite obviously the total length of the string remains constant, as should your measurements.

10 PRINT “Orbits Foci “;
30 INPUT “Velocity (13 to 30): “;w
40 PRINT w;AT 10,15;”f1″: CIRCLE 128,85,2
50 LET h=.4: LET g=1000000
60 LET x=g/1000: LET y=0
70 LET i=h/4: LET v=0
80 LET r=x: LET s=y: LET z=0
90 LET x=x+i*v: LET y=y+i*w
100 GO SUB 200
110 LET x=r: LET y=s: LET o=h/2
120 LET v=v+o*b: LET w=w+o*c
130 GO SUB 300
140 FOR t=0 TO w*7 STEP h
150 LET x=x+h*v: LET y=y+h*w
160 GO SUB 200
170 LET v=v+h*b: LET w=w+h*c
180 GO SUB 300: NEXT t: STOP
200 LET e=x*x+y*y: LET d=SQR e
220 LET a=-g/e: LET b=a*x/d
240 LET c=a*y/d: RETURN
300 PLOT x/10+128,y/10+85
310 IF x=-50 AND x>z THEN PLOT 228+x/10,85: PRINT AT 10,(228+x/10)/8-1;”f2”
320 LET z=x
330 RETURN