Chapter 6 – The Planets (The Rings of Saturn)

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 Rings of Saturn

Saturn is the most splendid of planets: it marked the boundary of the known solar system until 1781. It is a cold world — the Sun is no more than a brilliant star in its skies. But its remoteness has not stopped man from seeking a closer view, with the highly successful Voyager spacecraft of August 1981 returning images clearer than were ever possible from Earth-based telescopes (from a distance of about 900 million miles).

The beautiful ring planet has always impressed people, be they beginners or experts at the telescope. This program, and the two that follow are designed to satisfy different interests and demonstrate the graphic potential of the Spectrum.

The Rings of Saturn probably represents the most accurate computer simulation of Saturn ever attempted on a home micro. It is possibly even superior to many mainframe efforts, with the exception of NASA’s Planetary Laboratories.

It features a full-screen solid image with all hidden lines deleted and the globe and ring system drawn accurately to scale. The user may tilt the planet and ring system at any angle up to 90°. If 0° is INPUT the planet is drawn as viewed directly over its equator with the rings shown edge-on. If 90° is INPUT a polar view is presented with the ring system completely encircling the planet. You may select a northern or southern aspect for the tilt. An INPUT of’s’ will show the underside of the rings and equator and visible pole for this aspect.

The sequence for drawing the planet is as follows:

  1. Check image size; rescale if tilt >43°.
  2. Draw globe correcting apparent oblateness for tilt.
  3. Draw equator, correcting for tilt.
  4. Draw semi-transparent ring system.
  5. ‘Trace’ nearest edge of rings across globe according to N/S aspect.
  6. Draw Cassini Division through ring system: clockwise for N aspect.
  7. Delete Cassini Division if ‘behind’ planet.
  8. Plot visible pole position correcting apparent oblateness for tilt.

Using the SCREEN$ command
The program contains an option to COPY the completed picture to the ZX printer or to SAVE the image on to tape with the SCREEN$ command. The latter is simplicity itself — it is only necessary to press ‘p’ (for picture) and start the recorder to SAVE the picture you have created. The angle of tilt is automatically SAVEd in the file name, eg sat -23.4. To recreate the picture, enter LOAD “sat – 23.4″SCREEN$ and the Spectrum will search and display the appropriate image off the tape.

Saturn and computer simulations
Unlike some uninformed computer presentations of Saturn, the globe is not circular (except for the polar view) and so the CIRCLE command cannot be used to draw the planet. This oval (or correctly termed oblate spheroid) shape is due to Saturn’s rapid axial rotation in lOh 14m (Saturn’s day) causing the equatorial ‘bulge’ and polar ‘flattening’.

The Spectrum DRAWs the globe and ring system via the PLOT command using a rapid ellipse routine. In the case of the globe the reduction in oblateness from 10% to zero (full circle) is applied progressively through the change of tilt from 0° to 90°. Similarly the position of the equator and visible pole are correctly located according to the tilt of the planet and the oblateness as presented.

As seen from Earth, the appearance of the planet is limited to a maximum tilt of 26.73° (Saturn’s axial tilt to its orbit about the Sun) in both north or south directions plus or minus 0.49°, depending on the relative positions of Earth and Saturn in their orbits at the time. Thus any tilt in excess of 28° will represent a viewpoint other than from Earth.

The program
The REM statements show the general structure of the program. In the case of DRAWing the globe and rings, it is only necessary to calculate the outline of one quadrant of the ellipse and to mirror this in the remaining three quadrants by DRAWing each quadrant sequentially. Such a routine ensures that the DRAWing is executed rapidly with the minimum of calculation to slow the program down. In the case of the routine to DRAW the Cassini Division in the ring system, the program PLOTs one complete ellipse and you will note how relatively slow, though satisfying, this proves to be.

10 REM Rings of Saturn
20 LET sc=1: BORDER 0: PAPER 0: INK 6: CLS
30 PRINT “Saturn “;CHR$ 127;
40 INPUT “Tilt (0\’ to 90\’ )”,z
50 IF z>43 THEN LET sc=.66
60 INPUT “N or S tilt (n/s): “; LINE a$
70 LET ob=1.1*z/100
80 LET oe=.89+.11*ob
90 IF a$=”s” THEN LET z=-z
100 PRINT TAB 21;”Tilt=”;z;CHR$ 130
110 LET e=1/SIN ((.1+z)/180*PI)
115 LET p=COS ((.1+z)/180*PI): IF a$=”s” THEN LET p=-p
120 LET x=255/2: LET y=88
130 LET r=54*sc: LET h=126*sc
140 GO SUB 360
160 FOR f=0 TO 1.58 STEP .01
170 LET c=INT (SIN f*h)
180 LET d=INT (COS f*h/e)
190 PLOT x+c,y+d
200 DRAW -c/3,-d/3
210 PLOT x-c,y+d
220 DRAW c/3,-d/3
230 PLOT OVER 1;x-c,y-d
240 DRAW c/3,d/3
250 DRAW OVER 1;0,1
260 PLOT OVER 1;x+c,y-d
270 DRAW -c/3,d/3
280 DRAW OVER 1;0,1
290 NEXT f: GO SUB 460
310 PRINT #0;”Press x to COPY, c to CONTINUE”
320 PRINT #1;TAB 6;”s to SAVE “”sat “;STR$ z;””””: PAUSE 0
330 IF INKEY$=”x” THEN COPY : INPUT “”: GO TO 310
340 IF INKEY$=”s” THEN INPUT “”: SAVE “sat “+STR$ zSCREEN$ : INPUT “”: GO TO 310
350 RUN
370 FOR f=0 TO 1.420 STEP .019
380 LET a=INT (SIN f*r)
390 LET b=INT (COS f*r*oe)
400 PLOT x+a,y+b: DRAW 0,-b*2
410 PLOT x-a,y+b: DRAW 0,-b*2
420 NEXT f
440 FOR f=PI*.5 TO PI*1.5 STEP .1: PLOT OVER 1;x+SIN f*r,y+COS f*r/e: NEXT f: RETURN
460 LET cd=2.1
470 FOR f=0 TO PI*2 STEP .03: PLOT OVER 1;x+SIN f*r*cd,y+COS f*r*cd/e: DRAW OVER 1;2,0: NEXT f
485 IF ABS z>26 THEN GO TO 570
490 FOR f=0 TO 1.42 STEP .01
500 LET a=INT (SIN f*r)
510 LET b=INT (COS f*r*oe)
520 IF a$=”s” THEN LET b=-b
530 PLOT x+a,y: DRAW 0,b
540 PLOT x-a,y: DRAW 0,b
550 NEXT f
570 PLOT OVER 1;x,y+r*p*oe

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s