
\documentclass{standalone}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%%%<
\usepackage{standalone}
\usepackage{tikz}
% All other packages required
\usepackage{verbatim}
\usetikzlibrary{quotes,angles}
\usetikzlibrary{arrows}
\usetikzlibrary{angles,quotes,babel,intersections}
\usepackage{sansmath}
\usetikzlibrary{shadings,intersections}
\usetikzlibrary{calc,fadings,decorations.pathreplacing}
\usetikzlibrary{arrows.meta}

\usepackage{graphicx}
\usepackage{wrapfig}

%%%>
% syntax\Angle{<name linie1>}{<scheitelpunkt>}{<name linie2>}{<radius>}{<optionen für pic>}
\tikzset{ myangle/.style={draw,angle radius=#1,}, myangle/.initial=.5cm,}

\newcommand\Angle[5]{
  \path[overlay, name path=c](#2)circle[radius=#4];
  \path[name intersections={of=#1 and c,by={HS1}}];
  \path[name intersections={of=#3 and c,by={HS3}}];
  \pic[myangle=#4,#5]{angle=HS1--#2--HS3};
}

\newcommand\pgfmathsinandcos[3]{%
  \pgfmathsetmacro#1{sin(#3)}%
  \pgfmathsetmacro#2{cos(#3)}%
}
\newcommand\LongitudePlane[3][current plane]{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % azimuth
  \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\LatitudePlane[3][current plane]{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % latitude
  \pgfmathsetmacro\yshift{\cosEl*\sint}
  \tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
}
\newcommand\DrawLongitudeCircle[2][1]{
  \LongitudePlane{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
   % angle of "visibility"
  \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
  \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);
  \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);
}
\newcommand\DrawLatitudeCircle[2][1]{
  \LatitudePlane{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
  \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
  % angle of "visibility"
  \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
  \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);
  \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);
}
\usepackage{subfig}
\usepackage{graphicx}

\usepackage{wrapfig}

%% document-wide tikz options and styles

\tikzset{%
  >=latex, % option for nice arrows
  inner sep=0pt,%
  outer sep=2pt,%
  mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,
    fill=black,circle}%
}


\usetikzlibrary{external} 
 \tikzexternalize
 

\begin{document}

%-----------------------------------------------------------
\tikzsetnextfilename{PoincareKugel}
\begin{tikzpicture}[>={Triangle[length=0pt 9,width=0pt 3]}]

\def\R{2.5} % Radius
\def\angEl{35} % Winkel
\filldraw[ball color=white] (0,0) circle (\R);
\foreach \t in {-45,0,45} { \DrawLatitudeCircle[\R]{\t} }
\foreach \t in {0,45,...,135} { \DrawLongitudeCircle[\R]{\t} }

\coordinate (O) at (0,0);
\draw [thick,->] (O) -- (0,1) node[left] {$\mathbf{S_3}$};
\draw [thick,->] (O) -- (0.8660,-0.5) node[above right] {$\mathbf{S_2}$};
\draw [thick,->] (O) -- (-0.8660,-0.5) node[above left] {$\mathbf{S_1}$};

\end{tikzpicture}


%_________________________________________________________________
%Verzögerungsplatte Strahlteiler (polarisiert)
\tikzsetnextfilename{VerzStrahl}
\begin{tikzpicture}[scale=5, axis/.style={very thick, ->, >=stealth'}, important line/.style={thick}, dashed line/.style={dashed, thin}, pile/.style={thick, ->, >=stealth', shorten <=2pt, shorten >=2pt}, every node/.style={color=black},scale=0.5]
  
	% define coordinates
    \coordinate (A) at (0,0) ;
    \coordinate (B) at (2,-1) ;
    
    %grade
    \coordinate (C1) at (0.1396,-0.8603) ;
    \coordinate (C2) at (1.1937,0.1937) ;
    
    \coordinate (D1) at (0.8062,-1.1937) ;
    \coordinate (D2) at (1.8603,-0.1396) ;
 
	&gerade   
    \coordinate (E1) at (1.1404,-1.3866) ;
    \coordinate (E2) at (1.5262,0.0532) ;
	
    \coordinate (F1) at (0.4737,-1.0532) ;
    \coordinate (F2) at (0.8595,0.3866) ;   
    
	\coordinate (a) at(0.6666,-0.3333);
    \coordinate (b) at(1.333,-0.6666);
    
    %ray
    \draw [pile] (A)  -- (B) node[right] {Sensor}; 
    \node (A) [left] {Laser};

    \draw [pile] (F1) -- (F2) node[right] {Verzögerungsplatte};
    \draw [thick] (C1) -- (C2)  node[right] {E\textsubscript{0,x}};
    
    \draw [pile] (E1) -- (E2)  node[right] {Strahlteiler};
    \draw [thick] (D1) -- (D2)  node[right] {E\textsubscript{0,x}};
    
	\pic["$\Theta_v$", draw=black, thick=3, ->, angle eccentricity=1.2, angle radius=1cm] {angle=C2--a--F2};
	\pic["$\Theta_p$", draw=black, thick=3, ->, angle eccentricity=1.2, angle radius=1cm] {angle=D2--b--E2};
\end{tikzpicture}

%----------------------------------------------------------
\tikzsetnextfilename{Pol_Anal}
\begin{tikzpicture}[scale=5, axis/.style={very thick, ->, >=stealth'}, important line/.style={thick}, dashed line/.style={dashed, thin}, pile/.style={thick, ->, >=stealth', shorten <=2pt, shorten >=2pt}, every node/.style={color=black},scale=0.5]
  
	% define coordinates
    \coordinate (A) at (0,0) ;
    \coordinate (B) at (2,-1) ;
    
    \coordinate (C1) at (0.1396,-0.8603) ;
    \coordinate (C2) at (1.1937,0.1937) ;
    
    \coordinate (D1) at (0.8062,-1.1937) ;
    \coordinate (D2) at (1.8603,-0.1396) ;
    
    \coordinate (E1) at (1.1404,-1.3866) ;
    \coordinate (E2) at (1.5262,0.0532) ;

    \coordinate (F1) at (0.4737,-1.0532) ;
    \coordinate (F2) at (0.8595,0.3866) ;   
    
	\coordinate (a) at(0.6666,-0.3333);
    \coordinate (b) at(1.333,-0.6666);
    
    %ray
    \draw [pile] (A)  -- (B) node[right] {Sensor}; 
    \node (A) [left] {Laser};

    \draw [pile] (F1) -- (F2) node[right] {Polarisator};
    \draw [thick] (C1) -- (C2)  node[right] {E\textsubscript{0,x}};
    \draw [pile] (D1) -- (D2)  node[right] {Analysator};
    
	\pic["$\Theta_p$", draw=black, thick=3, ->, angle eccentricity=1.2, angle radius=1cm] {angle=C2--a--F2};
\end{tikzpicture}

\end{document}
