Summary Files Commits Branches @commit @diff @stats
path: root / src / teaching / upp-2025 / week06 / tex
diff options
context:
space:
mode:
diff --git a/src/teaching/upp-2025/week06/tex/rectangle_and_line.tex b/src/teaching/upp-2025/week06/tex/rectangle_and_line.tex
new file mode 100644
index 0000000..bfa66dd
--- /dev/null
+++ b/src/teaching/upp-2025/week06/tex/rectangle_and_line.tex
@@ -0,0 +1,20 @@
+% https://alfurka.github.io/quick-tikz/
+\def \recA {(-4,-1) rectangle ++(6,3)}
+\def \lineA {(4,5) -- (-5,-4)}
+
+\begin{tikzpicture}[background rectangle/.style={fill=white}, show background rectangle]
+ % Axis
+ \draw (-5,0) -- (5,0);
+ \draw (0,-5) -- (0,5);
+ \draw[step=1,gray,very thin] (-4.8,-4.8) grid (4.8,4.8);
+
+ % Main shapes
+ \draw[blue] \recA;
+ \draw[red] \lineA;
+
+ % Intersection
+ \begin{scope}
+ \clip \recA;
+ \draw[pattern=north west lines] \lineA -- (-5,5) -- cycle;
+ \end{scope}
+\end{tikzpicture}
diff --git a/src/teaching/upp-2025/week06/tex/rectangles_and_circle.tex b/src/teaching/upp-2025/week06/tex/rectangles_and_circle.tex
new file mode 100644
index 0000000..121f2d3
--- /dev/null
+++ b/src/teaching/upp-2025/week06/tex/rectangles_and_circle.tex
@@ -0,0 +1,22 @@
+% https://alfurka.github.io/quick-tikz/
+\def \recA {(0,-2.5) rectangle ++(3,3)}
+\def \recB {(-1,0) rectangle ++(3,1)}
+\def \circleA {(-1,-1) circle [radius=2.5]}
+
+\begin{tikzpicture}[background rectangle/.style={fill=white}, show background rectangle]
+ % Axis
+ \draw (-5,0) -- (5,0);
+ \draw (0,-5) -- (0,5);
+ \draw[step=1,gray,very thin] (-4.8,-4.8) grid (4.8,4.8);
+
+ % Main shapes
+ \draw[blue] \recA;
+ \draw[red] \recB;
+ \draw[brown] \circleA;
+
+ % Intersection
+ \begin{scope}
+ \clip \recB;
+ \draw[pattern=north west lines, even odd rule] \recA \circleA;
+ \end{scope}
+\end{tikzpicture}
diff --git a/src/teaching/upp-2025/week06/tex/triangle_and_circle.tex b/src/teaching/upp-2025/week06/tex/triangle_and_circle.tex
new file mode 100644
index 0000000..cf275fb
--- /dev/null
+++ b/src/teaching/upp-2025/week06/tex/triangle_and_circle.tex
@@ -0,0 +1,20 @@
+% https://alfurka.github.io/quick-tikz/
+\def \triangleA {(-3.5,-2) -- (-0.5,3) -- (3,2) -- cycle}
+\def \circleA {(1,-0.5) circle [radius=2]}
+
+\begin{tikzpicture}[background rectangle/.style={fill=white}, show background rectangle]
+ % Axis
+ \draw (-5,0) -- (5,0);
+ \draw (0,-5) -- (0,5);
+ \draw[step=1,gray,very thin] (-4.8,-4.8) grid (4.8,4.8);
+
+ % Main shapes
+ \draw[blue] \triangleA;
+ \draw[red] \circleA;
+
+ % Intersection
+ \begin{scope}
+ \clip \triangleA;
+ \draw[pattern=north east lines, even odd rule] \circleA \triangleA;
+ \end{scope}
+\end{tikzpicture}
diff --git a/src/teaching/upp-2025/week06/tex/two_circles.tex b/src/teaching/upp-2025/week06/tex/two_circles.tex
new file mode 100644
index 0000000..41a822c
--- /dev/null
+++ b/src/teaching/upp-2025/week06/tex/two_circles.tex
@@ -0,0 +1,20 @@
+% https://alfurka.github.io/quick-tikz/
+\def \circleA {(0.5,0) circle [radius=1.5]}
+\def \circleB {(0,-0.5) circle [radius=1.5]}
+
+\begin{tikzpicture}[scale=2,background rectangle/.style={fill=white}, show background rectangle]
+ % Axis
+ \draw (-2.5,0) -- (2.5,0);
+ \draw (0,-2.5) -- (0,2.5);
+ \draw[step=0.5,gray,very thin] (-2.4,-2.4) grid (2.4,2.4);
+
+ % Main shapes
+ \draw[blue] \circleA;
+ \draw[red] \circleB;
+
+ % Intersection
+ \begin{scope}
+ \clip \circleA;
+ \draw[pattern=crosshatch, even odd rule] \circleA \circleB;
+ \end{scope}
+\end{tikzpicture}