-
Notifications
You must be signed in to change notification settings - Fork 5
/
interface.tex
executable file
·119 lines (96 loc) · 4.52 KB
/
interface.tex
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
\documentclass[tikz, border = 1 cm]{standalone}
%%%%%%%%%%%%%%
\usepackage{bm}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.markings}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\definecolor{orange2}{RGB}{255,164,108}
\definecolor{bluegray1}{RGB}{0,127,167}
\definecolor{bluegray4}{RGB}{178,216,228}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%
\tdplotsetmaincoords{60}{10}
\begin{tikzpicture}[tdplot_main_coords,decoration={markings,mark=at position 0.6 with {\arrow{stealth}}}]
% Coordinates for surface 1
\coordinate (p1) at (0,0,0);
\coordinate (p2) at (0,7,0);
\coordinate (p3) at (9,7,0);
\coordinate (p4) at (9,0,0);
\coordinate (p0) at ($0.6*(p1) + 0.6*(p4)$);
% Coordinates for closed contour
\coordinate (p5) at (1,3.25,0.8);
\coordinate (p6) at (4,3.25,0.8);
\coordinate (pa) at (4,3.25,0);
\coordinate (p7) at (4,3.25,-0.8);
\coordinate (p8) at (1,3.25,-0.8);
\coordinate (pb) at (1,3.25,0);
% Coordinates for closed surface
\def\radius{1.0}
\coordinate (p9) at (7,3.25,0.8);
\coordinate (p9g) at ($(p9) + (0,-\radius,0)$);
\coordinate (p9d) at ($(p9) + (0,\radius,0)$);
\coordinate (p10) at (7,3.25,0.0);
\coordinate (p10g) at ($(p10) + (0,-\radius,0)$);
\coordinate (p10d) at ($(p10) + (0,\radius,0)$);
\coordinate (p11) at (7,3.25,-0.8);
\coordinate (p11g) at ($(p11) + (0,-\radius,0)$);
\coordinate (p11d) at ($(p11) + (0,\radius,0)$);
% Dashed lines for z perspective 2
\draw[dash pattern=on 2pt] ($(p2) + (0,0,1)$) -- ($(p2) + (0,0,-1)$);
% Borders for closed contour 1
\path[draw,thick,dash pattern=on 1pt] (pa) to[out=-90,in=90] (p7);
\path[draw,thick,dash pattern=on 1pt,postaction={decorate}] (p7) to[out=150,in=20] (p8);
\path[draw,thick,dash pattern=on 1pt] (p8) to[out=90,in=-90] (pb);
% Normal 1
\draw[orange2,-stealth,ultra thick] ($(p0) + (0,0.5,0)$) -- ($(p0) + (0,0.5,-1)$) node[anchor=east,black] {$\bm{n}_{2 \rightarrow 1}$};
\filldraw[fill=orange2,draw=black,ultra thin,dash pattern=on 0.5 pt] ($(p0) + (0,0.5,0)$) circle (0.1);
% Closed surface 1
\draw[draw,thick,dash pattern=on 1pt] (p11) circle (\radius);
\draw[draw,thick,dash pattern=on 1pt] (p10g) -- (p11g);
\draw[draw,thick,dash pattern=on 1pt] (p10d) -- (p11d);
% Borders for surface 1
\path[draw,thick] (p1) -- (p2);
\path[draw,thick] (p4) -- (p3);
\path[draw,thick] (p1) -- (p4);
\path[draw,thick] (p2) -- (p3);
% Filling surface 1
\shade[top color=bluegray1,bottom color=bluegray4,opacity=.30] (p1) -- (p2) -- (p3) -- (p4) -- (p1);
% Names
\node at (p9d) [anchor=south] {$\Sigma \equiv \partial \mathcal{V}$};
\node at ($0.5*(p5) + 0.5*(p6) + (0,0.75,0)$) [anchor=south] {$\Gamma \equiv \partial \mathcal{S}$};
% Normal to closed contour
\draw[orange2,-stealth,ultra thick] ($(pa) + (-0.3,0.5,0.2)$) -- ($(pa) + (-0.05,1.6,0.2)$) node[anchor=west,black] {$\bm{n}_{\mathcal{S}}$};
\filldraw[fill=orange2,draw=black,ultra thin,dash pattern=on 0.5 pt] ($(pa) + (-0.3,0.5,0.2)$) circle[x={(0.9cm,-0.2cm)},y={(0cm,0.866cm)},x radius=0.1,y radius=0.1];
% Borders for closed contour 2
\path[draw,thick,postaction={decorate}] (p5) to[out=20,in=150] (p6);
\path[draw,thick] (p6) to[out=-90,in=90] (pa);
\path[draw,thick] (pb) to[out=90,in=-90] (p5);
\path[draw,thick,dash pattern=on 2pt] (pa) to[out=150,in=20] (pb);
% Normal to closed surface
\draw[orange2,-stealth,ultra thick] ($(p9) + (-0.707,0.707,-0.4)$) -- ($(p9) + (-1.3,1.5,-0.4)$) node[anchor=east,black] {$\bm{n}_{\Sigma}$};
\filldraw[fill=orange2,draw=black,ultra thin,dash pattern=on 0.5 pt] ($(p9) + (-0.707,0.707,-0.4)$) circle[x={(0.866cm,0.2cm)},y={(0cm,0.866cm)},x radius=0.1,y radius=0.1];
% Closed surface 2
\draw[draw,thick] (p9) circle (\radius);
\draw[draw,thick,dash pattern=on 2pt] (p10) circle (\radius);
\draw[draw,thick] (p9g) -- (p10g);
\draw[draw,thick] (p9d) -- (p10d);
% Normal 2
\filldraw[fill=orange2,draw=black,ultra thin,dash pattern=on 0.5 pt] ($(p0) + (0,1,0)$) circle (0.1);
\draw[orange2,-stealth,ultra thick] ($(p0) + (0,1,0)$) -- ($(p0) + (0,1,1)$) node[anchor=south,black] {$\bm{n}_{1 \rightarrow 2}$};
% Media info
\node at (1,0,-0.5) {$(\epsilon_1, \mu_1)$};
\node at (1,0,0.5) {$(\epsilon_2, \mu_2)$};
% Dashed lines for z perspective 2
\draw[dash pattern=on 2pt] ($(p1) + (0,0,1)$) -- ($(p1) + (0,0,-1)$);
\draw[dash pattern=on 2pt] ($(p3) + (0,0,1)$) -- ($(p3) + (0,0,-1)$);
\draw[dash pattern=on 2pt] ($(p4) + (0,0,1)$) -- ($(p4) + (0,0,-1)$);
\end{tikzpicture}
%%%%%%%%%%%%%%
\end{document}