fix: Nummerierung GaltonbrettFächer ab 0

This commit is contained in:
2026-07-11 13:51:13 +02:00
parent 617fe08e2c
commit d418251711
2 changed files with 8 additions and 8 deletions
BIN
View File
Binary file not shown.
+8 -8
View File
@@ -360,21 +360,21 @@
\begin{multicols}{2} \begin{multicols}{2}
\begin{tikzpicture}[scale=0.8] \begin{tikzpicture}[scale=0.8]
% Definition der Reihen % Definition der Reihen
\def\rows{4} \def\rows{3}
% Zähler für die Beschriftung % Zähler für die Beschriftung
\newcounter{labelcount} \newcounter{labelcount}
% Fächer (Bins) am unteren Ende basierend auf der Reihenanzahl % Fächer (Bins) am unteren Ende basierend auf der Reihenanzahl
\foreach \i in {1,...,\rows} { \foreach \i in {0,...,\rows} {
\pgfmathsetmacro{\xpos}{\i * 2 - \rows} \pgfmathsetmacro{\xpos}{\i * 2 - \rows}
\draw[thick] (\xpos - 0.4, -\rows - 1.5) rectangle (\xpos + 0.4, -\rows - 0.2); \draw[thick] (\xpos - 0.4, -\rows - 1.5) rectangle (\xpos + 0.4, -\rows - 0.2);
\node at (\xpos, -\rows - 1.8) {\i}; \node at (\xpos, -\rows - 1.8) {\i};
} }
% Dreieckiges Nagelbrett % Dreieckiges Nagelbrett
\foreach \y in {1,...,\rows} { \foreach \y in {0,...,\rows} {
\foreach \x in {1,...,\y} { \foreach \x in {0,...,\y} {
\pgfmathsetmacro{\coordx}{2 * \x - \y} \pgfmathsetmacro{\coordx}{2 * \x - \y}
% Nagel zeichnen % Nagel zeichnen
@@ -402,21 +402,21 @@
\begin{tikzpicture}[scale=0.8] \begin{tikzpicture}[scale=0.8]
% Definition der Reihen % Definition der Reihen
\def\rows{5} \def\rows{4}
% Zähler für die Beschriftung % Zähler für die Beschriftung
\newcounter{labelcountzwo} \newcounter{labelcountzwo}
% Fächer (Bins) am unteren Ende basierend auf der Reihenanzahl % Fächer (Bins) am unteren Ende basierend auf der Reihenanzahl
\foreach \i in {1,...,\rows} { \foreach \i in {0,...,\rows} {
\pgfmathsetmacro{\xpos}{\i * 2 - \rows} \pgfmathsetmacro{\xpos}{\i * 2 - \rows}
\draw[thick] (\xpos - 0.4, -\rows - 1.5) rectangle (\xpos + 0.4, -\rows - 0.2); \draw[thick] (\xpos - 0.4, -\rows - 1.5) rectangle (\xpos + 0.4, -\rows - 0.2);
\node at (\xpos, -\rows - 1.8) {\i}; \node at (\xpos, -\rows - 1.8) {\i};
} }
% Dreieckiges Nagelbrett % Dreieckiges Nagelbrett
\foreach \y in {1,...,\rows} { \foreach \y in {0,...,\rows} {
\foreach \x in {1,...,\y} { \foreach \x in {0,...,\y} {
\pgfmathsetmacro{\coordx}{2 * \x - \y} \pgfmathsetmacro{\coordx}{2 * \x - \y}
% Nagel zeichnen % Nagel zeichnen