REM Pseodo Solar Systems, RG Weston, 26.12.2002 MODE8:OFF GCOL0,1 ORIGIN 640,512 REPEAT PRINTTAB(25,1)"Simulated Planetary Orbits" PRINTTAB(25,31)"Press Space Bar to go again" FOR n=1 TO 9 GCOL0,n T=RND(360) :REM angle of ellipse axis to the x axis a=40*n e=RND(100)/1000 :REM eccentricity PRINTTAB(35,2)"e = ";e;SPC(3) PROCellipse(a,e,T) delay=INKEY(120) NEXT G=GET 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 NEXT ENDPROC