Skip to content

Instantly share code, notes, and snippets.

@aitatanit
Last active October 31, 2016 11:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aitatanit/7c350fa49e90cd767090f617a998aeb9 to your computer and use it in GitHub Desktop.
Save aitatanit/7c350fa49e90cd767090f617a998aeb9 to your computer and use it in GitHub Desktop.
TE mode (S-polarization) of EM wave at oblique incidence at an interface between two media
% Oblique Incidence - TE Mode (S-Polarization)
% Author: Jimmy Touma (10/27/2016)
%
% Adapted from:
% Edgar Fuentes (Club de LaTeX UC member)
% http://www.texample.net/tikz/examples/oblique-incidence/
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{%
decorations.pathreplacing,%
decorations.pathmorphing%
}
\usepackage{verbatim}
\begin{comment}
:Title: Oblique Incidence of TE Wave
:Tags: Decorations, Physics, chemistry, & Optics
Reflection and refraction of electromagnetic TE-polarized wave incident obliquely at plane interface.
:Author: `Jimmy Touma`_
.. _Jimmy Touma: https://gist.github.com/aitatanit/7c350fa49e90cd767090f617a998aeb9
\end{comment}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[
media/.style={font={\footnotesize\sffamily}},
wave/.style={
decorate,decoration={snake,post length=1.4mm,amplitude=2mm,
segment length=2mm},thick},
interface/.style={
% The border decoration is a path replacing decorator.
% For the interface style we want to draw the original path.
% The postaction option is therefore used to ensure that the
% border decoration is drawn *after* the original path.
postaction={draw,decorate,decoration={border,angle=-45,
amplitude=0.3cm,segment length=2mm}}},
]
% Round rectangle
\fill[gray!10,rounded corners] (0,-4) rectangle (4,4);
% Interface
\draw[blue,line width=.5pt,interface](0,-4)--(0,4);
% horizontal dashed line
\draw[dashed,gray](-4,0)--(4,0);
% Coordinates system
\draw(-0.15,-0.15)node[below]{$y$};
\draw[<->,line width=1pt] (2,0) node[below]{$z$}-|(0,2) node[left]{$x$};
% Incidence
\draw[->,wave]
(225:3.9cm)--(225:3.2cm)node[above]{$k_i$};
\draw[gray](0:0cm)--(225:3cm);
\path (0,0)++(205:1cm)node{$\phi_i$};
\draw[->](-0.75,0)arc(180:225:.75cm);
\filldraw[fill=white,line width=1pt](-1.3,-1.3)circle(.12cm);
\draw[line width=.6pt] (-1.3,-1.3)
+(-135:.12cm) -- +(45:.12cm)
+(-45:.12cm) -- +(135:.12cm);
%+(-45:0cm) -- +(135:1cm);
\draw[->] (-1.3,-1.3)
+(-45:0cm) -- +(135:1cm)node[left]{$\vec{B_i}$};
\draw(-1.3,-1.4)node[below]{$\vec{E_i}$};
% Reflection
\draw[->,wave]
(135:3.2cm)--(135:3.9cm)node[above]{$k_r$};
\path (0,0)++(155:1.3cm) node{$\phi_r$};
\draw[gray](0:0cm)--(135:3cm);
\draw[->] (-1,0)arc(180:135:1cm);
\filldraw[fill=white,line width=1pt](-1.3,1.3)circle(.12cm);
\draw[line width=.6pt] (-1.3,1.3)
+(-135:.12cm) -- +(45:.12cm)
+(-45:.12cm) -- +(135:.12cm);
%+(-45:0cm) -- +(135:1cm);
\draw[->] (-1.13,1.3)
+(135:.12cm) -- +(215:1cm)node[above]{$\vec{B_r}$};
\draw(-1.2,1.3)node[right]{$\vec{E_r}$};
% Transmission
\draw[->,wave]
(30:3.1cm)--(30:3.9cm)node[right]{$k_t$};
\draw[gray](0:0cm)--(30:3cm);
\path (0,0)++(15:1.3cm)node{$\phi_t$};
\draw[->] (1,0) arc (0:30:1cm);
\filldraw[fill=white,line width=1pt](1.6,0.9)circle(.12cm);
\draw[line width=.6pt] (1.6,0.9)
+(210:.12cm) -- +(30:.12cm)
+(-45:.12cm) -- +(135:.12cm);
%+(-45:0cm) -- +(135:1cm);
\draw[->] (1.6,0.9)
+(-30:0cm) -- +(120:1cm)node[right]{$\vec{B_t}$};
\draw(1.7,0.8)node[right]{$\vec{E_t}$};
% Media names
\path[media] (-0.5,-3.5) node {$n_1$}
(0.6,-3.5) node {$n_2$};
\filldraw[fill=white,line width=1pt](0,0)circle(.15cm);
\filldraw[fill=black,line width=1pt](0,0)circle(.05cm);
% Interface pointer
\draw[-latex,thick](-0.5,4)node[left]{$\mathsf{S_{1,2}}$}
to[out=0,in=90] (0,3.5);
% To-paths are really useful for drawing curved lines. The above
% to path is equal to:
%
% \draw[-latex,thick](3.2,0.5)node[right]{$\mathsf{S_{1,2}}$}
% ..controls +(180:.2cm) and +(up:0.25cm) .. (3,0);
% Internally the to path is translated to a similar bezier curve,
% but the to path syntax hides the complexity from the user.
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment