From 2a00e92d0fe7cc05c5d4182a9800f23aaf986dbf Mon Sep 17 00:00:00 2001 From: CDaut Date: Thu, 15 Jun 2023 16:42:02 +0200 Subject: [PATCH] raycasting diagram --- .gitignore | 3 ++ presentation/diagrams/diagramm_occlusion.tex | 40 ++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 presentation/diagrams/diagramm_occlusion.tex diff --git a/.gitignore b/.gitignore index 475ecb1..4b728ea 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ presentation.run.xml presentation.snm presentation.synctex.gz presentation.toc + + +presentation/build/ \ No newline at end of file diff --git a/presentation/diagrams/diagramm_occlusion.tex b/presentation/diagrams/diagramm_occlusion.tex new file mode 100644 index 0000000..465a288 --- /dev/null +++ b/presentation/diagrams/diagramm_occlusion.tex @@ -0,0 +1,40 @@ +\documentclass[margin=5mm, tikz]{standalone} +\usepackage{tikz, ifthen, calc} + +\begin{document} + +\begin{tikzpicture} + + \def\raynum{120} + + \foreach \x in {0,...,\raynum} { + \ifthenelse{\x < 20 \OR \x>100} + { + \draw[color = red] (\x /\raynum * 6 ,0) -- (3,4); + }{ + \draw[color = green] (\x /\raynum * 6 ,0) -- (3,4); + + } + } + + \fill[ + white + ] (1.49,1) -- (4.51,1) -- (5.01,0) -- (0.99,0) -- cycle; + + + \draw [color=red] (0,0) -- node[below]{wall} (6,0) ; % wall + \draw [color=green](1.5,1) -- node[below]{blocker} (4.5,1); %blocker + + %cam + \node[ + circle, + fill = black, + minimum width = 1mm, + outer sep = 2mm + ] (camera) at (3,4) {}; + \node at (camera.north) {camera}; + + +\end{tikzpicture} + +\end{document} \ No newline at end of file