Laws of Planetary Motion
First several packages are required:--> load(draw) --> load(newton1)An ellipse is determined by the length 2a of its major axis and the eccentricity e (0 < e < 1). The trajectory

--> a: 2; e: 0.6; --> DRAW: [grid=true, xrange=[-3,4], yrange=[-3,3], color=blue, parametric(a*cos(E),a*sqrt(1-e^2)*sin(E),E,0,2*%pi)]; apply(draw2d, DRAW);Kepler's first law. A planet revolves around the sun in an elliptical orbit with the sun at the focus (ae,0).
--> ff: [a*e,0] --> DRAW: append(DRAW, [color=red, point_size=2, point_type=filled_circle, points([ff])]); apply(draw2d, DRAW)Kepler's second law. The line joining the sun to a planet sweeps out equal areas in equal times. Furthermore, the Kepler's equation

--> for i from 1 thru 12 do (E[i]: newton(x-e*sin(x)-3.14*(i/6), x, 3.14*(i/6), 1/50)) --> RR: makelist([a*cos(E[i]),a*sqrt(1-e^2)*sin(E[i])]-ff,i,1,12) --> DRAW: append(DRAW, append([color=red, head_length=0.05], makelist(vector(ff,RR[i]),i,1,12))); apply(draw2d, DRAW);Determining the velocity of the planet. Let









--> UU: makelist(rr/sqrt(rr.rr),rr,RR) --> cc: [e,0] --> VVH: makelist(uu+cc,uu,UU) --> DRAW: append(DRAW, append([color=yellow, head_length=0.1], makelist(vector(RR[i]+ff,VVH[i]),i,1,12))); apply(draw2d, DRAW)It is deduced that




--> VV: makelist([-dd[2],dd[1]]/sqrt(a*(1-e^2)), dd, VVH) --> DRAW: append(DRAW, append([color=green, head_length=0.1], makelist(vector(RR[i]+ff,VV[i]),i,1,12))); apply(draw2d, DRAW)
Here you can download the entire demonstration.
© TTU Mathematics