%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% filename:	tikzschnitt.tex
%% author:	Hermann Lorenz
%% date:	24. Mär 2014 06:52
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{arrows}
\usetikzlibrary{intersections}

\tikzset
{
	verlauf/.style={
		draw=#1!50!black!50,
		top color=white,
		bottom color=#1!50!black!20,
	},
}

\tikzset
{
	orangeverlauf/.style={
		draw=orange!80!black!50,
		top color=white,
		bottom color=orange!80!black!20,
	},
}

\begin{document}

\begin{frame}{Methodik}
  \begin{tikzpicture}
    \path [draw=blue, name path=etwas  ] (0,0) -- (5,0) -- (5,3) --
    (0,3) -- cycle;
    \path [draw=green,  name path=anderes] (-1,2) -- (3,4);

    \path [name intersections={of=etwas and anderes}];
    \path [draw=red, ultra thick, <-] (intersection-1) -- +(0,1);
    \path [draw=red, ultra thick, <-] (intersection-2) -- +(-1,0);
  \end{tikzpicture}
\end{frame}


\begin{frame}{Komplexbeispiel}
\begin{tikzpicture}[
	strahlung/.style={
	>=stealth',
	->,
	decoration={snake,post length=2mm},
	decorate,
	thick,
	},
]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% stimulator, probe, detektor und filter malen %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [draw, circle,
		thick,
		orangeverlauf,
	] (stimulator) {LED};
\node [draw, circle, thick, verlauf=blue] (probe) at (3,0) {Probe};
\node [name path=detektor,draw, rectangle, inner sep=.5cm] (detektor) at (9,0) {Detektor};
\uncover<4->{\node [draw, rectangle, minimum height=2cm, fill=white] (filter) at (6,0) {\rotatebox{90}{Filter}};}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Strahlung von Probe zu Detektor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw<2-> [strahlung, blue] (probe) -- (detektor);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Strahlung um stimulator und probe %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw [strahlung, orange] (node cs:name=stimulator, angle=0) -- (probe);
\foreach \x in {60, 120, ..., 300} {
	\draw [strahlung, orange] (node cs:name=stimulator, angle=\x) -- +(\x:.90);
}
\foreach \x in {60, 120, 240, 300} {
	\uncover<2->{\draw [strahlung, blue] (node cs:name=probe, angle=\x) -- +(\x:1);}
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Gruene Strahlung auf Detektor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%                  +---+
%   (Y)---___      | F |
%            ---(X)| i |               +-----------+
%                  | l |---___         |           |
%                  | t |      ---___   |           |
%                  | e |            (Z)|  Detektor |
%                  | r |               |           |
%                  +---+               +-----------+
%
%
%

% Endpunkt am Filter Filter (X) festlegen
\coordinate (anfilter) at (node cs:name=filter, angle=120);
% Startpunkt der Strahlung (Y) = (X) + 1cm in 170°-Richtung
\coordinate (start) at ($(anfilter) + (170:1)$);
% Pfad von (Y) ueber (X) weiter bis zum Detektor
\path [name path=pfad] (start) -- +(170:-4);
% in Overlay 3 von (Y) bis (Z) zeichnen
\draw<3>  [name intersections={of=pfad and detektor},
	   strahlung, green!50!black!50] (start) -- (intersection-1);
% in Overlay 4 von (Y) bis (X) zeichnen
\draw<4-> [strahlung, green!50!black!50] (start) -- (anfilter);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Orangene Strahlung auf Detektor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% analog gruene Strahlung mit geaendertem Punkt an Filter und Winkel
\coordinate (anfilter) at (node cs:name=filter, angle=240);
\coordinate (start) at ($(anfilter) + (190:1)$);
\path [name path=pfad] (start) -- +(190:-4);
\draw<3>  [name intersections={of=pfad and detektor},
	   strahlung, orange] (start) -- (intersection-1);
\draw<4-> [strahlung, orange] (start) -- (anfilter);

\end{tikzpicture}
\end{frame}

\end{document}


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% TeX-PDF-mode: t
%%% TeX-engine: luatex
%%% End: 
