aboutsummaryrefslogtreecommitdiff
path: root/Mathe/22_23
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-01-13 17:32:19 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2024-01-13 17:32:19 +0100
commitc49e3baa396ea04a7c85ae7080cd788a7e034854 (patch)
tree8b7dba6c65f5f8906500e64abbe359ac932696aa /Mathe/22_23
parentc4fdb9cc6287d13d9d25ef9eca5c8d6177ec5731 (diff)
downloadunterricht-c49e3baa396ea04a7c85ae7080cd788a7e034854.tar.gz
unterricht-c49e3baa396ea04a7c85ae7080cd788a7e034854.zip
add grid never used last year since I found my snakes and ladders board
Diffstat (limited to 'Mathe/22_23')
-rw-r--r--Mathe/22_23/07/14/.gitignore1
-rw-r--r--Mathe/22_23/07/14/grid.tex16
2 files changed, 17 insertions, 0 deletions
diff --git a/Mathe/22_23/07/14/.gitignore b/Mathe/22_23/07/14/.gitignore
new file mode 100644
index 00000000..e790b789
--- /dev/null
+++ b/Mathe/22_23/07/14/.gitignore
@@ -0,0 +1 @@
+grid.pdf
diff --git a/Mathe/22_23/07/14/grid.tex b/Mathe/22_23/07/14/grid.tex
new file mode 100644
index 00000000..5356183d
--- /dev/null
+++ b/Mathe/22_23/07/14/grid.tex
@@ -0,0 +1,16 @@
+\documentclass[tikz]{standalone}
+
+\usepackage{ifthen}
+\usepackage{intcalc}
+
+\begin{document}
+\begin{tikzpicture}
+ \pgfkeys{/pgf/number format/.cd,fixed,precision=0}
+ \draw[gray,step=2cm] (0,0) grid (20cm, 20cm) rectangle (0, 0);
+
+ \foreach \y in {1,...,10}
+ \foreach \x in {1,...,10}
+ \pgfmathsetmacro{\p}{ifthenelse(\intcalcMod{\y}{2}==1, \x + (\y - 1) * 10, 10 * \y - \x + 1)}
+ \node at (\x * 2cm - 1cm, \y * 2cm - 1cm) { \pgfmathprintnumber{\p} };
+\end{tikzpicture}
+\end{document}