1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;
double ma(2), mb(1.5), mc(sqrt((ma - mb)*(ma + mb))), mt(M_PI_2), dt(0.3);
P f(double t)
{
return P(ma*Cos(t), mb*Sin(t));
}
int main()
{
picture(P(-ma,-mb), P(ma,mb), "2 x 1.5in");
begin();
arrow_width(6);
arrow_ratio(2);
arrow_inset(0.75);
P Sun(-mc, 0), pP(f(mt)), pV(f(mt + 0.001));
bold();
plot(f, 0, 2*M_PI, 120);
spot(Sun, P(0, -4), "\\textsf{\\itshape Sun}", b);
spot(pP, P(0, -4), "\\textsf{\\itshape Planet}", b);
arrow(pP, pP + 750*(pV - pP));
arrow(f(mt + dt), f(mt + dt + 0.001));
label(P(0, ymax()), P(0, 2), "\\textsf{\\itshape Force (on false hypothesis)}", t);
tikz_format();
end();
}
|