Hallo zusammen, ich bin auf ein neues Problem gestoßen und finde bisher leider keine passende Hilfe über div. Suchen. Daher hoffe ich, dass ihr mir weiterhelfen könnt. Ich möchte mich ein wenig weiter in Beamer, tikz und Animationen üben und daher folgendes bauen: Der Satz des Pythagoras als Scherungsbeweis. Daher möchte ich eines der Kathetenquadrate scheren (diese Animation funktioniert wunderbar auf Folie 1) und anschließend das entstandene Parallelogramm um den Dreieckspunkt, den es beinhaltet (in diesem Falle B), um 90 Grad gegen den Uhrzeigersinn drehen. Meine Versuche mit der Option Hier mein aktueller Code: Open in Online-Editor
\documentclass{beamer} \usepackage{tikz} \usetikzlibrary{intersections,angles,quotes,calc,through,babel} \usepackage{animate} \usepackage{ifthen} %%%%%%%%%%%% Für Folie 1%%%%%%%%%%%%%%%% \newcommand{\PytA}[1]{% \gdef\setA{#1} \begin{tikzpicture}[scale=0.5] \coordinate (A) at (0,0); \coordinate (B) at (5,0); \coordinate (C) at ($(B)+(126.8698976:3)$); \coordinate (AB) at ($(A)!1!270:(B)$); \coordinate (BA) at ($(B)!1!90:(A)$); \coordinate (BC) at ($(B)!1!270:(C)$); \coordinate (CB) at ($(C)!1!90:(B)$); \coordinate (CA) at ($(C)!1!270:(A)$); \coordinate (AC) at ($(A)!1!90:(C)$); \coordinate (HA) at ($(B)!(A)!(C)$); \coordinate (HB) at ($(A)!(B)!(C)$); \coordinate (HC) at ($(A)!(C)!(B)$); \path[name path=A--HA](A) -- ($(A)!12cm!(HA)$); \path[name path=B--HB](B) -- ($(B)!12cm!(HB)$); \path[name path=C--HC](C) -- ($(C)!12cm!(HC)$); \path[name path=BC--CB](BC) -- (CB); \coordinate (H) at (intersection of B--HB and A--HA); \coordinate (HA2) at (intersection of BC--CB and A--HA); \coordinate (HB2) at (intersection of CA--AC and B--HB); \coordinate (HC2) at (intersection of BA--AB and C--HC); \pic[draw,fill=orange, opacity=0.5,angle radius=.15cm]{angle=A--C--B}; \draw (A)--(B)--(C)--cycle; \draw (A)--(B)--(BA)--(AB)--cycle; \draw (B)--(C)--(CB)--(BC)--cycle; \draw (C)--(A)--(AC)--(CA)--cycle; \draw (C)--(HC2); \coordinate (WanderCB) at ($(C)!0.05*\setA!(A)+(36.86989765:3)$); \fill [green!20!white, opacity=.8](BC)--(B)--($(C)!0.05*\setA!(A)$)--(WanderCB)-- cycle; \end{tikzpicture} } %%%%%%%%%%%% Für Folie 2 %%%%%%%%%%%%%%%%%%%%%%% \newcommand{\PytB}[1]{% \gdef\setA{#1} \begin{tikzpicture}[scale=0.5] \coordinate (A) at (0,0); \coordinate (B) at (5,0); \coordinate (C) at ($(B)+(126.8698976:3)$); \coordinate (AB) at ($(A)!1!270:(B)$); \coordinate (BA) at ($(B)!1!90:(A)$); \coordinate (BC) at ($(B)!1!270:(C)$); \coordinate (CB) at ($(C)!1!90:(B)$); \coordinate (CA) at ($(C)!1!270:(A)$); \coordinate (AC) at ($(A)!1!90:(C)$); \coordinate (HA) at ($(B)!(A)!(C)$); \coordinate (HB) at ($(A)!(B)!(C)$); \coordinate (HC) at ($(A)!(C)!(B)$); \path[name path=A--HA](A) -- ($(A)!12cm!(HA)$); \path[name path=B--HB](B) -- ($(B)!12cm!(HB)$); \path[name path=C--HC](C) -- ($(C)!12cm!(HC)$); \path[name path=BC--CB](BC) -- (CB); \coordinate (H) at (intersection of B--HB and A--HA); \coordinate (HA2) at (intersection of BC--CB and A--HA); \coordinate (HB2) at (intersection of CA--AC and B--HB); \coordinate (HC2) at (intersection of BA--AB and C--HC); \pic[draw,fill=orange, opacity=0.5,angle radius=.15cm]{angle=A--C--B}; \draw (A)--(B)--(C)--cycle; \draw (A)--(B)--(BA)--(AB)--cycle; \draw (B)--(C)--(CB)--(BC)--cycle; \draw (C)--(A)--(AC)--(CA)--cycle; \draw (C)--(HC2); \coordinate (WanderCB) at ($(A)+(36.86989765:3)$); \fill [rotate around={\setA:(5,0)},green!20!white, opacity=.8](BC)--(B)--(A)--(WanderCB)-- cycle; \end{tikzpicture} } \newcounter{Schritt} %Für Folie 1 / Scherung \setcounter{Schritt}{1} \newcounter{Winkel} %FÜr Folie 2 / Drehung um B \setcounter{Winkel}{0} \begin{document} %%%%%%%%%%%%% Folie 1 %%%%%%%%%%%%%%% \frame{\frametitle{Pythagoras} \begin{center} \begin{animateinline}[]{12} \PytA{0} \whiledo{\value{Schritt} < 20}{ \newframe \PytA{\arabic{Schritt}} \stepcounter {Schritt}} \end{animateinline} \end{center} } %%%%%%%%%%% Folie 2 %%%%%%%%%%%%%%%%% \frame{\frametitle{Pythagoras} \begin{center} \begin{animateinline}[]{12} \PytB{0} \whiledo{\value{Winkel} < 90}{ \newframe \PytB{\arabic{Winkel}} \stepcounter {Winkel}} \end{animateinline} \end{center} } \end{document} Ich hoffe, dass ihr mir weiterhelfen könnt! :) gefragt 11 Mai '16, 16:41 Wienie2401 |
Du musst die Rotation als Option der einzelnen Koordinaten angeben: Open in Online-Editor
\fill [green!20!white, opacity=.8]
([crot]BC)--([crot]B)--([crot]A)--([crot]WanderCB)-- cycle;
und vorher Open in Online-Editor
\gdef\setA{#1}% \tikzset{crot/.style={{rotate around={\setA:(5,0)}}}}% Code für die Abbildung: Open in Online-Editor
\documentclass[margin=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections,angles,quotes,calc,through,babel} \newcommand{\PytB}[1]{% \gdef\setA{#1}% \tikzset{crot/.style={{rotate around={\setA:(5,0)}}}}% \begin{tikzpicture}[scale=0.5] \coordinate (A) at (0,0); \coordinate (B) at (5,0); \coordinate (C) at ($(B)+(126.8698976:3)$); \coordinate (AB) at ($(A)!1!270:(B)$); \coordinate (BA) at ($(B)!1!90:(A)$); \coordinate (BC) at ($(B)!1!270:(C)$); \coordinate (CB) at ($(C)!1!90:(B)$); \coordinate (CA) at ($(C)!1!270:(A)$); \coordinate (AC) at ($(A)!1!90:(C)$); \coordinate (HA) at ($(B)!(A)!(C)$); \coordinate (HB) at ($(A)!(B)!(C)$); \coordinate (HC) at ($(A)!(C)!(B)$); \path[name path=A--HA](A) -- ($(A)!12cm!(HA)$); \path[name path=B--HB](B) -- ($(B)!12cm!(HB)$); \path[name path=C--HC](C) -- ($(C)!12cm!(HC)$); \path[name path=BC--CB](BC) -- (CB); \coordinate (H) at (intersection of B--HB and A--HA); \coordinate (HA2) at (intersection of BC--CB and A--HA); \coordinate (HB2) at (intersection of CA--AC and B--HB); \coordinate (HC2) at (intersection of BA--AB and C--HC); \pic[draw,fill=orange, opacity=0.5,angle radius=.15cm]{angle=A--C--B}; \draw (A)--(B)--(C)--cycle; \draw (A)--(B)--(BA)--(AB)--cycle; \draw (B)--(C)--(CB)--(BC)--cycle; \draw (C)--(A)--(AC)--(CA)--cycle; \draw (C)--(HC2); \coordinate (WanderCB) at ($(A)+(36.86989765:3)$); \fill [green!20!white, opacity=.8] ([crot]BC)--([crot]B)--([crot]A)--([crot]WanderCB)-- cycle; \end{tikzpicture}% } \begin{document} \foreach \winkel in {0,15,...,90}{\PytB{\winkel}} \end{document} beantwortet 11 Mai '16, 22:12 esdd |