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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;
void mirror(const P& loc, const P& refl, double thk = 0.25, double wd = 6)
{
double my(pt_to_screen(wd)), mx(pt_to_screen(thk));
P dir(refl - loc);
dir *= 1.0/(norm(dir));
P perp(J(dir)),
p1(loc + mx*dir - my*perp),
p2(loc + mx*dir + my*perp),
p3(loc - mx*dir + my*perp),
p4(loc - mx*dir - my*perp);
quad(p1, p2, p3, p4);
}
void scope(const P& vwr, const P& pt)
{
double mx(pt_to_screen(8)), my(pt_to_screen(2));
P dir(pt - vwr);
dir *= 1.0/(norm(dir));
P perp(J(dir)),
p1(pt - 2*mx*dir + my*perp),
p2(pt - 2*mx*dir - my*perp),
p3(pt - my*perp),
p4(pt + my*perp);
quad(p1, p2, p3, p4);
ellipse(pt, 0.2*my*dir, my*perp);
ellipse(pt - 2*mx*dir, 0.2*my*dir, my*perp);
// viewer's eye
double th(40);
P eye(pt - 3*mx*dir);
line(eye, eye + polar(3*my, -th));
line(eye, eye + polar(3*my, th));
arc_measure(eye, cis(-th), cis(th), 4);
arc_measure(eye, cis(-10), cis(10), 4.25);
}
int main()
{
picture(P(-1,-1), P(1,1), "2 x 2in");
begin();
P O(0, 0), pA(E_1), pAp(E_2);
degrees();
line(O, pA);
line(O, pAp);
dashed();
dash_size(6);
line(O, -pA);
line(O, -pAp);
solid();
fill(Black());
mirror(pA, O);
mirror(pAp, O);
fill(White());
mirror(P(0,0), P(-1,1), 1, 12);
masklabel(-pAp, "*");
label(-pAp, P(4, 0), "\\textit{Source of Light.}", r);
scope(-pA - E_1, -pA);
label(-pA, P(0, -12), "\\textit{Observer.}", b);
label(pA, P(2, 0), "$A$", r);
label(pAp, P(0, 2), "$A'$", t);
label(0.5*pA, P(0, -4), "$l$", b);
label(0.5*pAp, P(2, 0), "$l'$", r);
label(P(0.5*(xmin() + xmax()), ymin()), P(0, -24), "\\textsc{Fig.~9.}", b);
tikz_format();
end();
}
|