aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/040-rekursion/images/beta.tex
blob: 1e1a1b3be78466a010bbde4685c37b2a7e25760d (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
%
% beta.tex -- display some symmetric beta distributions
%
% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
%
\documentclass[tikz]{standalone}
\usepackage{amsmath}
\usepackage{times}
\usepackage{txfonts}
\usepackage{pgfplots}
\usepackage{csvsimple}
\usetikzlibrary{arrows,intersections,math,calc}
\input{betapaths.tex}
\begin{document}
\def\skala{12}
\definecolor{colorone}{rgb}{1.0,0.6,0.0}
\definecolor{colortwo}{rgb}{1.0,0.0,0.0}
\definecolor{colorthree}{rgb}{0.6,0.0,0.6}
\definecolor{colorfour}{rgb}{0.6,0.0,1.0}
\definecolor{colorfive}{rgb}{0.0,0.0,1.0}
\definecolor{colorsix}{rgb}{0.4,0.6,1.0}
\definecolor{colorseven}{rgb}{0.0,0.0,0.0}
\definecolor{coloreight}{rgb}{0.0,0.8,0.8}
\definecolor{colornine}{rgb}{0.0,0.8,0.2}
\definecolor{colorten}{rgb}{0.2,0.4,0.0}
\definecolor{coloreleven}{rgb}{0.6,1.0,0.0}
\definecolor{colortwelve}{rgb}{1.0,0.8,0.4}

\def\achsen{
	\foreach \x in {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9}{
		\draw ({\x*\dx},{-0.1/\skala}) -- ({\x*\dx},{0.1/\skala});
		\node at ({\x*\dx},{-0.1/\skala}) [below] {$\x$};
	}
	\foreach \y in {1,2,3,4}{
		\draw ({-0.1/\skala},{\y*\dy}) -- ({0.1/\skala},{\y*\dy});
		\node at ({-0.1/\skala},{\y*\dy}) [left] {$\y$};
	}
	\def\x{1}
	\draw ({\x*\dx},{-0.1/\skala}) -- ({\x*\dx},{0.1/\skala});
	\node at ({\x*\dx},{-0.1/\skala}) [below] {$\x$};
	\def\x{0}
	\node at ({\x*\dx},{-0.1/\skala}) [below] {$\x$};

	\draw[->] ({-0.1/\skala},0) -- ({1*\dx+0.4/\skala},0)
		coordinate[label={$x$}];
	\draw[->] (0,{-0.1/\skala}) -- (0,{\betamax*\dy+0.4/\skala},0)
		coordinate[label={right:$\beta(a,b,x)$}];
}

\def\farbcoord#1#2{
	({\dx*(0.63+((#1)/5)*0.27)},{\dx*(0.18+((#2)/5)*0.27)})
}
\def\farbviereck{
	\foreach \x in {1,2,3,4}{
		\draw[color=gray!30] \farbcoord{\x}{0} -- \farbcoord{\x}{4};
		\draw[color=gray!30] \farbcoord{0}{\x} -- \farbcoord{4}{\x};
	}
	\draw[->] \farbcoord{0}{0} -- \farbcoord{4.4}{0}
		coordinate[label={$a$}];
	\draw[->] \farbcoord{0}{0} -- \farbcoord{0}{4.4}
		coordinate[label={left: $b$}];
	\foreach \x in {1,2,3,4}{
		\node[color=gray] at \farbcoord{4}{\x} [right] {\tiny $b=\x$};
		%\fill[color=white,opacity=0.7] 
		%	\farbcoord{(\x-0.1)}{3.3}
		%	rectangle
		%	\farbcoord{(\x+0.1)}{4};
		\node[color=gray] at \farbcoord{\x}{4} [right,rotate=90]
			{\tiny $a=\x$};
	}
}
\def\farbpunkt#1#2#3{
	\fill[color=#3] \farbcoord{#1}{#2} circle[radius={0.1/\skala}];
}

\begin{tikzpicture}[>=latex,thick,scale=\skala]

\def\dx{1.15}
\def\dy{0.1}
\def\opa{0.1}

\def\betamax{4.9}

\begin{scope}
\clip (0,0) rectangle ({1*\dx},{\betamax*\dy});
\fill[color=colorone,opacity=\opa]    (0,0) -- \betaaa -- (\dx,0) -- cycle;
\fill[color=colortwo,opacity=\opa]    (0,0) -- \betabb -- (\dx,0) -- cycle;
\fill[color=colorthree,opacity=\opa]  (0,0) -- \betacc -- (\dx,0) -- cycle;
\fill[color=colorfour,opacity=\opa]   (0,0) -- \betadd -- (\dx,0) -- cycle;
\fill[color=colorfive,opacity=\opa]   (0,0) -- \betaee -- (\dx,0) -- cycle;
\fill[color=colorsix,opacity=\opa]    (0,0) -- \betaff -- (\dx,0) -- cycle;
\fill[color=colorseven,opacity=\opa]  (0,0) -- \betagg -- (\dx,0) -- cycle;
\fill[color=coloreight,opacity=\opa]  (0,0) -- \betahh -- (\dx,0) -- cycle;
\fill[color=colornine,opacity=\opa]   (0,0) -- \betaii -- (\dx,0) -- cycle;
\fill[color=colorten,opacity=\opa]    (0,0) -- \betajj -- (\dx,0) -- cycle;
\fill[color=coloreleven,opacity=\opa] (0,0) -- \betakk -- (\dx,0) -- cycle;
\fill[color=colortwelve,opacity=\opa] (0,0) -- \betall -- (\dx,0) -- cycle;

\draw[color=colorone]    \betaaa;
\draw[color=colortwo]    \betabb;
\draw[color=colorthree]  \betacc;
\draw[color=colorfour]   \betadd;
\draw[color=colorfive]   \betaee;
\draw[color=colorsix]    \betaff;
\draw[color=colorseven]  \betagg;
\draw[color=coloreight]  \betahh;
\draw[color=colornine]   \betaii;
\draw[color=colorten]    \betajj;
\draw[color=coloreleven] \betakk;
\draw[color=colortwelve] \betall;

\end{scope}

\achsen

\farbviereck

\farbpunkt{\alphatwelve}{\betatwelve}{colortwelve}
\farbpunkt{\alphaeleven}{\betaeleven}{coloreleven}
\farbpunkt{\alphaten}{\betaten}{colorten}
\farbpunkt{\alphanine}{\betanine}{colornine}
\farbpunkt{\alphaeight}{\betaeight}{coloreight}
\farbpunkt{\alphaseven}{\betaseven}{colorseven}
\farbpunkt{\alphasix}{\betasix}{colorsix}
\farbpunkt{\alphafive}{\betafive}{colorfive}
\farbpunkt{\alphafour}{\betafour}{colorfour}
\farbpunkt{\alphathree}{\betathree}{colorthree}
\farbpunkt{\alphatwo}{\betatwo}{colortwo}
\farbpunkt{\alphaone}{\betaone}{colorone}


\def\betamax{4.9}

\begin{scope}[yshift=-0.6cm]

\begin{scope}
\clip (0,0) rectangle ({1*\dx},{\betamax*\dy});
\fill[color=colorone,opacity=\opa]    (0,0) -- \betaea -- (\dx,0) -- cycle;
\fill[color=colortwo,opacity=\opa]    (0,0) -- \betaeb -- (\dx,0) -- cycle;
\fill[color=colorthree,opacity=\opa]  (0,0) -- \betaec -- (\dx,0) -- cycle;
\fill[color=colorfour,opacity=\opa]   (0,0) -- \betaed -- (\dx,0) -- cycle;
\fill[color=colorfive,opacity=\opa]   (0,0) -- \betaee -- (\dx,0) -- cycle;
\fill[color=colorsix,opacity=\opa]    (0,0) -- \betaef -- (\dx,0) -- cycle;
\fill[color=colorseven,opacity=\opa]  (0,0) -- \betaeg -- (\dx,0) -- cycle;
\fill[color=coloreight,opacity=\opa]  (0,0) -- \betaeh -- (\dx,0) -- cycle;
\fill[color=colornine,opacity=\opa]   (0,0) -- \betaei -- (\dx,0) -- cycle;
\fill[color=colorten,opacity=\opa]    (0,0) -- \betaej -- (\dx,0) -- cycle;
\fill[color=coloreleven,opacity=\opa] (0,0) -- \betaek -- (\dx,0) -- cycle;
\fill[color=colortwelve,opacity=\opa] (0,0) -- \betael -- (\dx,0) -- cycle;

\draw[color=colorone]    \betaea;
\draw[color=colortwo]    \betaeb;
\draw[color=colorthree]  \betaec;
\draw[color=colorfour]   \betaed;
\draw[color=colorfive]   \betaee;
\draw[color=colorsix]    \betaef;
\draw[color=colorseven]  \betaeg;
\draw[color=coloreight]  \betaeh;
\draw[color=colornine]   \betaei;
\draw[color=colorten]    \betaej;
\draw[color=coloreleven] \betaek;
\draw[color=colortwelve] \betael;
\end{scope}

\achsen

\farbviereck

\farbpunkt{\alphafive}{\betatwelve}{colortwelve}
\farbpunkt{\alphafive}{\betaeleven}{coloreleven}
\farbpunkt{\alphafive}{\betaten}{colorten}
\farbpunkt{\alphafive}{\betanine}{colornine}
\farbpunkt{\alphafive}{\betaeight}{coloreight}
\farbpunkt{\alphafive}{\betaseven}{colorseven}
\farbpunkt{\alphafive}{\betasix}{colorsix}
\farbpunkt{\alphafive}{\betafive}{colorfive}
\farbpunkt{\alphafive}{\betafour}{colorfour}
\farbpunkt{\alphafive}{\betathree}{colorthree}
\farbpunkt{\alphafive}{\betatwo}{colortwo}
\farbpunkt{\alphafive}{\betaone}{colorone}

\end{scope}

\begin{scope}[yshift=-1.2cm]

\begin{scope}
\clip (0,0) rectangle ({1*\dx},{\betamax*\dy});
\fill[color=colorone,opacity=\opa]    (0,0) -- \betaal -- (\dx,0) -- cycle;
\fill[color=colortwo,opacity=\opa]    (0,0) -- \betabl -- (\dx,0) -- cycle;
\fill[color=colorthree,opacity=\opa]  (0,0) -- \betacl -- (\dx,0) -- cycle;
\fill[color=colorfour,opacity=\opa]   (0,0) -- \betadl -- (\dx,0) -- cycle;
\fill[color=colorfive,opacity=\opa]   (0,0) -- \betael -- (\dx,0) -- cycle;
\fill[color=colorsix,opacity=\opa]    (0,0) -- \betafl -- (\dx,0) -- cycle;
\fill[color=colorseven,opacity=\opa]  (0,0) -- \betagl -- (\dx,0) -- cycle;
\fill[color=coloreight,opacity=\opa]  (0,0) -- \betahl -- (\dx,0) -- cycle;
\fill[color=colornine,opacity=\opa]   (0,0) -- \betail -- (\dx,0) -- cycle;
\fill[color=colorten,opacity=\opa]    (0,0) -- \betajl -- (\dx,0) -- cycle;
\fill[color=coloreleven,opacity=\opa] (0,0) -- \betakl -- (\dx,0) -- cycle;
\fill[color=colortwelve,opacity=\opa] (0,0) -- \betall -- (\dx,0) -- cycle;

\draw[color=colorone]    \betaal;
\draw[color=colortwo]    \betabl;
\draw[color=colorthree]  \betacl;
\draw[color=colorfour]   \betadl;
\draw[color=colorfive]   \betael;
\draw[color=colorsix]    \betafl;
\draw[color=colorseven]  \betagl;
\draw[color=coloreight]  \betahl;
\draw[color=colornine]   \betail;
\draw[color=colorten]    \betajl;
\draw[color=coloreleven] \betakl;
\draw[color=colortwelve] \betall;
\end{scope}

\achsen

\farbviereck

\farbpunkt{\alphatwelve}{\betatwelve}{colortwelve}
\farbpunkt{\alphaeleven}{\betatwelve}{coloreleven}
\farbpunkt{\alphaten}{\betatwelve}{colorten}
\farbpunkt{\alphanine}{\betatwelve}{colornine}
\farbpunkt{\alphaeight}{\betatwelve}{coloreight}
\farbpunkt{\alphaseven}{\betatwelve}{colorseven}
\farbpunkt{\alphasix}{\betatwelve}{colorsix}
\farbpunkt{\alphafive}{\betatwelve}{colorfive}
\farbpunkt{\alphafour}{\betatwelve}{colorfour}
\farbpunkt{\alphathree}{\betatwelve}{colorthree}
\farbpunkt{\alphatwo}{\betatwelve}{colortwo}
\farbpunkt{\alphaone}{\betatwelve}{colorone}

\end{scope}

\end{tikzpicture}
\end{document}