# Chapter 5 – Solar System Orbits (Comet Orbit)

## 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.  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