"File: PLANET" "AUXILIARY FUNCTIONS" EL_(a,n,k):=ELEMENT(a,n,k) data:=[["planet","major axis","eccentricity","period","perihelion",1960],["mer~ cury",0.3874,0.2056,0.2408,15511/11567,2273/585],["venus",0.7728,0.0068,0.6152~ ,2.28652,3.042],["earth",1,0.0167,1,5941/3329,1.74808],["mars",1.5233,0.0934,1~ .8808,31890/5449,4.51632],["jupiter",5.2025,0.0484,11.8612,1604/6719,4.5349],[~ "saturn",36226/3797,0.0543,29.4568,27583/17129,1788/365],["uranus",46690/2433,~ 0.046,84.008,14121/4759,24122/9781],["neptune",30.602,0.008575,56524/343,17/22~ ,11359/3000],["pluto",23941/606,0.2481,248.35,3.91232,3.17032]] [MA_(n):=EL_(data,n+1,2),E_(n):=EL_(data,n+1,3),PD_(n):=EL_(data,n+1,4),PH_(n)~ :=EL_(data,n+1,5),L60_(n):=EL_(data,n+1,6)] P__(e,p,t):=2*pi*t/p+e*SIN(2*pi*t/p+e*SIN(2*pi*t/p+e*SIN(2*pi*t/p+e*SIN(2*pi*t~ /p)))) phi(n,t):=P__(E_(n),PD_(n),t) RT_(theta):=[[COS(theta),-SIN(theta)],[SIN(theta),COS(theta)]] ROT_(n):=RT_(PH_(n)) m_d:=[0.0873999,0.073061,-0.00562367,-0.346512,8.27974,15.4935,-6.12523,78.981~ 3,-17.7539] T_60(n):=ELEMENT(m_d,n) T_H(n,e,p):=MA_(n)*ROT_(n) . [COS(p)-e,SQRT(1-e^2)*SIN(p)] "############################################" "USER FUNCTIONS" P_ORBIT(n,theta):=MA_(n)*(1-E_(n)^2)/(1+E_(n)*COS(theta-PH_(n))) ALL_P_ORBIT(theta):=VECTOR(P_ORBIT(n,theta),n,1,9) T_ORBIT(n,t):=T_H(n,E_(n),phi(n,t+T_60(n))) "#####################################" "INSTRUCTIONS" "P_ORBIT(N,é) returns the polar equation of the orbit of Planet N" "ALL_P_ORBIT(é) returns the vector of the polar equations " ".....of all 9 planets." ".....approX and Plot in polar coordinates." "__________________________" "T_ORBIT(N,T) returns the vector giving the location" ".....of planet N at time T (measured in years.)" ".....Time T=0 is January 1, 1960." ".....approX and Plot in rectangular coordinates" ".....The Plot is parametric. Set parameter domain for the span" ".....of years you want to plot. t=0 is January 1, 1960." "aproX DATA to see data on planets" "####################" "Example 1" "Major axis is given in astronomical units (earth distance =1)" "period is in years" "perihelion gives the polar angle from the equinox to the perihelion" "1960 is the polar angle from the equinox to the planet January 1, 1960." "approX the following to see data on the planets" data "Example 2" "approX the following and then Plot (see graphics settings above)" "to see the orbits of all nine planets." ALL_P_ORBIT(theta) "Example 3" "approX the following and the Plot (see graphics settings above)" "to see what path of Mars as viewed from Earth" "Set the PARAMETER DOMAIN to MIN: (year to start picture) MAX: (year to end pi~ cture)" T_ORBIT(4,theta)-T_ORBIT(3,theta) "Example 4" "approX the following and then Plot" "to see the distance from Earth to Venus as a function of time." ABS(T_ORBIT(3,t)-T_ORBIT(2,t))