aboutsummaryrefslogtreecommitdiffstats
path: root/vorlesungen/slides/7/drehanim.tex
blob: ac136f113495d20fc906cfc8d7e0a2faf511cba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
%
% template.tex -- slide template
%
% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
%
\bgroup

\definecolor{darkgreen}{rgb}{0,0.6,0}
\def\punkt#1#2{ ({\A*(#1)+\B*(#2)},{\C*(#1)+\D*(#2)}) }

\makeatletter
\hoffset=-2cm
\advance\textwidth2cm
\hsize\textwidth
\columnwidth\textwidth
\makeatother

\begin{frame}[t,plain]
\vspace{-5pt}
\setlength{\abovedisplayskip}{5pt}
\setlength{\belowdisplayskip}{5pt}
\begin{center}
\begin{tikzpicture}[>=latex,thick]

\fill[color=white] (-4,-4) rectangle (9,4.5);

\def\a{60}

\pgfmathparse{tan(\a)}
\xdef\T{\pgfmathresult}

\pgfmathparse{-sin(\a)*cos(\a)}
\xdef\S{\pgfmathresult}

\pgfmathparse{1/cos(\a)}
\xdef\E{\pgfmathresult}

\def\N{20}
\pgfmathparse{2*\N}
\xdef\Nzwei{\pgfmathresult}
\pgfmathparse{3*\N}
\xdef\Ndrei{\pgfmathresult}

\node at (4.2,4.2) [below right] {\begin{minipage}{7cm}
\begin{block}{$\operatorname{SO}(2)\subset\operatorname{SL}_2(\mathbb{R})$}
\begin{itemize}
\item Thus most $A\in\operatorname{SL}_2(\mathbb{R})$ can be parametrized
as shear mappings and axis rescalings
\[
A=
\begin{pmatrix}d&0\\0&d^{-1}\end{pmatrix}
\begin{pmatrix}1&s\\0&1\end{pmatrix}
\begin{pmatrix}1&0\\t&1\end{pmatrix}
\]
\item Most rotations can be decomposed into a product of
shear mappings and axis rescalings
\end{itemize}
\end{block}
\end{minipage}};

\foreach \d in {1,2,...,\Ndrei}{
	% Scherung in Y-Richtung
	\ifnum \d>\N
		\pgfmathparse{\T}
	\else
		\pgfmathparse{\T*(\d-1)/(\N-1)}
	\fi
	\xdef\t{\pgfmathresult}

	% Scherung in X-Richtung
	\ifnum \d>\Nzwei
		\xdef\s{\S}
	\else
		\ifnum \d<\N
			\xdef\s{0}
		\else
			\ifnum \d=\N
				\xdef\s{0}
			\else
				\pgfmathparse{\S*(\d-\N-1)/(\N-1)}
				\xdef\s{\pgfmathresult}
			\fi
		\fi
	\fi

	% Reskalierung der Achsen
	\ifnum \d>\Nzwei
		\pgfmathparse{exp(ln(\E)*(\d-2*\N-1)/(\N-1))}
	\else
		\pgfmathparse{1}
	\fi
	\xdef\e{\pgfmathresult}

	% Matrixelemente 
	\pgfmathparse{(\e)*((\s)*(\t)+1)}
	\xdef\A{\pgfmathresult}

	\pgfmathparse{(\e)*(\s)}
	\xdef\B{\pgfmathresult}

	\pgfmathparse{(\t)/(\e)}
	\xdef\C{\pgfmathresult}

	\pgfmathparse{1/(\e)}
	\xdef\D{\pgfmathresult}

	\only<\d>{
		\node at (5.0,-0.9) [below right] {$
			\begin{aligned}
				t &= \t                 \\
				s &= \s                 \\
				d &= \e                 \\
				D &= \begin{pmatrix}
					\A&\B\\
					\C&\D
				     \end{pmatrix}
					\qquad
					\only<60>{\checkmark}
			\end{aligned}
		$};
	}

	\begin{scope}
		\clip (-4.05,-4.05) rectangle (4.05,4.05);
		\only<\d>{
			\foreach \x in {-6,...,6}{
				\draw[color=blue,line width=0.5pt]
					\punkt{\x}{-12} -- \punkt{\x}{12};
			}
			\foreach \y in {-12,...,12}{
				\draw[color=darkgreen,line width=0.5pt]
					\punkt{-6}{\y} -- \punkt{6}{\y};
			}

			\foreach \r in {1,2,3,4}{
				\draw[color=red] plot[domain=0:359,samples=360]
					({\r*(\A*cos(\x)+\B*sin(\x))},{\r*(\C*cos(\x)+\D*sin(\x))})
					--
					cycle;
			}
		}
	\end{scope}

%	\uncover<\d>{
%		\node at (5,4) {\d};
%	}
}

\draw[->] (-4,0) -- (4.2,0) coordinate[label={$x$}];
\draw[->] (0,-4) -- (0,4.2) coordinate[label={right:$y$}];

\end{tikzpicture}
\end{center}
\end{frame}
\egroup