\documentclass[12pt, xcolor, aspectratio=169]{beamer}

% language
\usepackage{polyglossia}
\setmainlanguage{german}

% pretty drawings
\usepackage{tikz}
\usetikzlibrary{positioning}

% Theme
\beamertemplatenavigationsymbolsempty

% set look
\usetheme{default} 
\usecolortheme{fly}
\usefonttheme{serif}

%% Set font
\usepackage[p,osf]{scholax}
\usepackage{amsmath}
\usepackage[scaled=1.075,ncf,vvarbb]{newtxmath}

% set colors
\definecolor{background}{HTML}{202020}

\setbeamercolor{normal text}{fg=white, bg=background}
\setbeamercolor{structure}{fg=white}

\setbeamercolor{item projected}{use=item,fg=background,bg=item.fg!35}

\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50}
\setbeamercolor*{palette quaternary}{fg=white,bg=background}

\setbeamercolor*{block title}{parent=structure}
\setbeamercolor*{block body}{fg=background, bg=}

\setbeamercolor*{framesubtitle}{fg=white}

\setbeamertemplate{section page}
{
  \begin{center}
    \Huge
    \insertsection
  \end{center}
}
\AtBeginSection{\frame{\sectionpage}}

% Macros
\newcommand{\ten}[1]{#1}

% Metadata
\title{\LARGE \scshape Punktgruppen und Kristalle}
\author[N. Pross, T. T\"onz]{Naoki Pross, Tim T\"onz}
\institute{Hochschule f\"ur Technik OST, Rapperswil}
\date{10. Mai 2021}

% Slides
\begin{document}
\frame{\titlepage}
\frame{\tableofcontents}

\section{Einleitung}
\frame{
  \[
    \psi
  \]
}

\section{Geometrische Symmetrien}
%% Made in video

\section{Algebraische Symmetrien}
%% Made in video

\section{Kristalle}

\section{Anwendungen}
\begin{frame}[fragile]{}
  \centering
  \begin{tikzpicture}[
      box/.style = {
        rectangle, thick, draw = white, fill = darkgray!50!background,
        minimum height = 1cm, outer sep = 2mm,
      },
    ]

    \matrix [nodes = {box, align = center}, column sep = 1cm, row sep = 1.5cm] {
      & \node (A) {32 Punktgruppe}; \\
      \node (B) {11 Mit\\ Inversionszentrum}; & \node (C) {21 Ohne\\ Inversionszentrum}; \\
      & \node[fill=red!20!background] (D) {20 Piezoelektrisch}; & \node (E) {1 Nicht\\ piezoelektrisch}; \\
    };

    \draw[thick, ->] (A.west) to[out=180, in=90] (B.north);
    \draw[thick, ->] (A.south) to (C);
    \draw[thick, ->] (C.south) to (D.north);
    \draw[thick, ->] (C.east) to[out=0, in=90] (E.north);
  \end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{}
  \begin{tikzpicture}[
      overlay, xshift = 1.5cm, yshift = 1.5cm,
      node distance = 2mm,
      charge/.style = {
        circle, draw = white, thick,
        minimum size = 5mm
      },
      positive/.style = { fill = red!50 },
      negative/.style = { fill = blue!50 },
    ]

    \node[font = {\large\bfseries}, align = center] (title) at (6,0) {Mit und Ohne\\ Symmetriezentrum};
    \node[below = of title] {Polarisation Feld \(\vec{E}_p\)};

    \begin{scope}
      \matrix[nodes = { charge }, row sep = 8mm, column sep = 8mm] {
        \node[positive] {}; & \node[negative] (N) {}; & \node [positive] {}; \\
        \node[negative] (W) {}; & \node[positive] {}; & \node [negative] (E) {}; \\
        \node[positive] {}; & \node[negative] (S) {}; & \node [positive] {}; \\
      };
      \draw[gray, dashed] (W) to (N) to (E) to (S) to (W);
    \end{scope}

    \begin{scope}[yshift=-4.5cm]
      \matrix[nodes = { charge }, row sep = 5mm, column sep = 1cm] {
        \node[positive] (NW) {}; & \node[negative] (N) {}; & \node [positive] (NE) {}; \\
        \node[negative] (W) {}; & \node[positive] {}; & \node [negative] (E) {}; \\
        \node[positive] (SW) {}; & \node[negative] (S) {}; & \node [positive] (SE) {}; \\
      };

      \foreach \d in {NW, N, NE} {
        \draw[orange, very thick, <-] (\d) to ++(0,.7);
      }

      \foreach \d in {SW, S, SE} {
        \draw[orange, very thick, <-] (\d) to ++(0,-.7);
      }

      \draw[gray, dashed] (W) to (N) to (E) to (S) to (W);
    \end{scope}

    \begin{scope}[xshift=11cm]
      \foreach \x/\t [count=\i] in {60/positive, 120/negative, 180/positive, 240/negative, 300/positive, 360/negative} {
        \node[charge, \t] (C\i) at (\x:1.5cm) {};
      }

      \draw[white] (C1) to (C2) to (C3) to (C4) to (C5) to (C6) to (C1);
      \draw[gray, dashed] (C2) to (C4) to (C6) to (C2);
    \end{scope}

    \begin{scope}[xshift=6cm, yshift=-4.5cm]
      \node[charge, positive, yshift=-2.5mm] (C1) at ( 60:1.5cm) {};
      \node[charge, negative, yshift=-2.5mm] (C2) at (120:1.5cm) {};
      \node[charge, positive, xshift=-2.5mm] (C3) at (180:1.5cm) {};
      \node[charge, negative, yshift= 2.5mm] (C4) at (240:1.5cm) {};
      \node[charge, positive, yshift= 2.5mm] (C5) at (300:1.5cm) {};
      \node[charge, negative, xshift= 2.5mm] (C6) at (360:1.5cm) {};

      \draw[white] (C1) to (C2) to (C3) to (C4) to (C5) to (C6) to (C1);
      % \draw[gray, dashed] (C2) to (C4) to (C6) to (C2);

      \foreach \d in {C1, C2} {
        \draw[orange, very thick, <-] (\d) to ++(0,.7);
      }

      \foreach \d in {C4, C5} {
        \draw[orange, very thick, <-] (\d) to ++(0,-.7);
      }

      \node[white] (E) {\(\vec{E}_p\)};
      \begin{scope}[node distance = .5mm]
        \node[blue!50, right = of E] {\(-\)};
        \node[red!50, left = of E] {\(+\)};
      \end{scope}
    \end{scope}

    \begin{scope}[xshift=11cm, yshift=-4.5cm]
      \node[charge, positive, yshift= 2.5mm] (C1) at ( 60:1.5cm) {};
      \node[charge, negative, yshift= 2.5mm] (C2) at (120:1.5cm) {};
      \node[charge, positive, xshift= 2.5mm] (C3) at (180:1.5cm) {};
      \node[charge, negative, yshift=-2.5mm] (C4) at (240:1.5cm) {};
      \node[charge, positive, yshift=-2.5mm] (C5) at (300:1.5cm) {};
      \node[charge, negative, xshift=-2.5mm] (C6) at (360:1.5cm) {};

      \draw[white] (C1) to (C2) to (C3) to (C4) to (C5) to (C6) to (C1);
      % \draw[gray, dashed] (C2) to (C4) to (C6) to (C2);

      \draw[orange, very thick, <-] (C6) to ++(.7,0);
      \draw[orange, very thick, <-] (C3) to ++(-.7,0);

      \node[white] (E) {\(\vec{E}_p\)};
      \begin{scope}[node distance = .5mm]
        \node[blue!50, right = of E] {\(-\)};
        \node[red!50, left = of E] {\(+\)};
      \end{scope}
    \end{scope}
  \end{tikzpicture}
\end{frame}

\frame{
  \begin{columns}[T]
    \begin{column}{.5\textwidth}
      Symmetriegruppe und Darstellung
      \begin{align*}
        G &= \left\{\mathbb{1}, r, \sigma, \dots \right\} \\
        &\Phi : G \to O(n)
      \end{align*}
      \begin{align*}
        U_\lambda &= \left\{ v : \Phi v = \lambda v \right\} \\
        &= \mathrm{null}\left(\Phi - \lambda I\right)
      \end{align*}
      Helmholtz Wellengleichung
      \[
        \nabla^2 \vec{E} = \ten{\varepsilon}\mu
        \frac{\partial^2}{\partial t^2} \vec{E}
      \]
    \end{column}
    \begin{column}{.5\textwidth}
      Ebene Welle
      \[
        \vec{E} = \vec{E}_0 \exp\left[i
          \left(\vec{k}\cdot\vec{r} - \omega t \right)\right]
      \]
      Anisotropisch Dielektrikum
      \[
        \ten{R}\ten{\varepsilon}\vec{E} = \frac{\omega^2}{\mu k^2} \vec{E}
      \]
      \[
        \vec{E} \in U_\lambda \implies (\ten{R}\ten{\varepsilon}) \vec{E} = \lambda \vec{E}
      \]
      \"Ahenlich auch in der Mechanik
      \[
        \vec{F} = \kappa \vec{x} \quad \text{(Hooke)}
      \]
    \end{column}
  \end{columns}
}

\end{document}
