2
$\begingroup$

I am trying to plot a simple display of Kepler's second law - equal areas of an ellipse swept out in an equal amount of time. The problem is that I need my sections area sections to have a focus as their point of convergence, not the center. Is the problem caused by my use of parametric equations?

xe[t_] := 5*Cos[t];
ye[t_] := 3*Sin[t];
re[t_] := Sqrt[25*Cos[t]^2 + 9*Sin[t]^2]

P := {2.5, 0};
Q := {xe[Pi/6], ye[Pi/6]};
R := {xe[Pi/3], ye[Pi/3]};
S := {xe[7 Pi/6], ye[7 Pi/6]};
T := {xe[4 Pi/3], ye[4 Pi/3]}

p1 = ParametricPlot[{xe[t], ye[t]}, {t, 0, 2 Pi}, {r, 0, 1}];
l1 = ListLinePlot[{P, Q}];
l2 = ListLinePlot[{P, R}];
l3 = ListLinePlot[{P, S}];
l4 = ListLinePlot[{P, T}];
Show[p1, l1, l2, l3, l4]

enter image description here

enter image description here

$\endgroup$
2
$\begingroup$

Here is just a draft that needs to be updated later since I am not so familar with Physic. The code has some bugs :-(

Accoring to Kepler's Equation : $M=E-\mathrm{e}\sin E$

Clear["`*"];
a = 5;
b = 3;
c = Sqrt[a^2 - b^2];
e = c/a;
p = b^2/c;
ρ[θ_] = (p*e)/(1 + e*Cos[θ]);
fig = PolarPlot[ρ[θ], {θ, 0, 2 π}];

angle[M_] := 
  2 (π + ArcTan[Sqrt[(1 + e)/(1 - e)] Tan[eE/2]]) /. 
    NSolve[M == eE - e*Sin[eE] && 0 <= eE <= 2 π, eE] // First;
{θ1, θ2, θ3, θ4} = 
  angle /@ {.01*2 π, 0.11*2 π, 0.6*2 π, 0.7*2 π};

reg1 = ParametricRegion[ρ[θ]*
    r*{Cos[θ], 
     Sin[θ]}, {{θ, θ1, θ2}, {r, 0, 1}}];
reg2 = ParametricRegion[ρ[θ]*
    r*{Cos[θ], 
     Sin[θ]}, {{θ, θ3, θ4}, {r, 0, 1}}];
Show[fig, RegionPlot[reg1, PlotStyle -> Red], 
 RegionPlot[reg2, PlotStyle -> Yellow], PlotRange -> All]

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Fantastic! I can update the math to make if needed. $\endgroup$ – Earthling Ben Oct 3 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.