REM Very Elliptical Orbits, RG Weston, 31.12.2002 MODE8:OFF GCOL0,1 ORIGIN 640,512 REPEAT PRINTTAB(28,1)"Very Elliptical Orbits" FOR n=1 TO 15 GCOL0,RND(7) T=RND(360) :REM angle of ellipse axis to the x axis a=20+RND(250):REM semimajor axis e=0.9+RND(99)/1000 :REM eccentricity PRINTTAB(35,3)"e = ";e;SPC(3) PROCellipse(a,e,T) d=20 +((n^0.5)*20) delay=INKEY(d) NEXT delay=INKEY(200) CLS UNTIL FALSE END : DEF PROCellipse(a,e,T) PLOT69,0,0 b=a*SQR(1-(e^2)) REM PRINTTAB(0,0) "Semi-major axis = ";a;" Eccentricity= ";e,"Angle= ";T;" deg" FOR t=1 TO 360 REM ellipse centred on origin x= a*COSRADt y=b*SINRADt REM shift centre to the focus xx=x-(a*e) yy=y REM Rotate point by angle T xxx=(xx*COSRADT) + (yy*SINRADT) yyy=-(xx*SINRADT) + (yy*COSRADT) IF t=1 MOVE xxx,yyy DRAW xxx,yyy del=INKEY(1) NEXT ENDPROC