This commit is contained in:
CDaut 2023-06-18 15:18:17 +02:00
parent 7169f03ff8
commit d075b35808

View file

@ -1,90 +1,94 @@
\begin{minipage}{0.4\linewidth} \begin{figure}
\begin{figure} \begin{minipage}{0.45\linewidth}
\begin{tikzpicture} \begin{figure}
%tri after movement \begin{tikzpicture}
\draw[ %tri after movement
fill, \draw[
kit-green40 fill,
] (-0.3,0) -- (6.3,0) -- (3,3.3) -- cycle; kit-green40
] (-0.3,0) -- (6.3,0) -- (3,3.3) -- cycle;
%primary tri %primary tri
\draw[ \draw[
fill, fill,
kit-green100 kit-green100
] (0,0) -- (6,0) -- (3,3) -- cycle; ] (0,0) -- (6,0) -- (3,3) -- cycle;
%arrow %arrow
\draw[ \draw[
-to, -to,
line width = 1.2pt, line width = 1.2pt,
kit-red100 kit-red100
] (3,3) -- (3,4); ] (3,3) -- (3,4);
% occlusion tri % occlusion tri
\draw[ \draw[
fill, fill,
kit-red100 kit-red100
] (3,2) -- (4.5,0.2) -- (6,3); ] (3,2) -- (4.5,0.2) -- (6,3);
% samples % samples
\foreach \x/\y in { \foreach \x/\y in {
1/0.5, 1/0.5,
1/2.5, 1/2.5,
3/0.5, 3/0.5,
3/2.5, 3/2.5,
5/0.5, 5/0.5,
5/2.5 5/2.5
} }
\node[fill = yellow] at (\x,\y) {}; \node[fill = yellow] at (\x,\y) {};
\end{tikzpicture} \end{tikzpicture}
\caption[area sampling]{area sampling} \caption[area sampling]{area sampling}
\end{figure} \end{figure}
\end{minipage} \end{minipage}
\hspace{10mm} \hspace{10mm}
\begin{minipage}{0.4\linewidth} \begin{minipage}{0.45\linewidth}
\begin{figure} \begin{figure}
\begin{tikzpicture} \begin{tikzpicture}
%tri after movement %tri after movement
\draw[ \draw[
fill, fill,
kit-green40 kit-green40
] (-0.3,0) -- (6.3,0) -- (3,3.3) -- cycle; ] (-0.3,0) -- (6.3,0) -- (3,3.3) -- cycle;
%primary tri %primary tri
\draw[ \draw[
fill, fill,
kit-green100 kit-green100
] (0,0) -- (6,0) -- (3,3) -- cycle; ] (0,0) -- (6,0) -- (3,3) -- cycle;
%arrow %arrow
\draw[ \draw[
-to, -to,
line width = 1.2pt, line width = 1.2pt,
kit-red100 kit-red100
] (3,3) -- (3,4); ] (3,3) -- (3,4);
% occlusion tri % occlusion tri
\draw[ \draw[
fill, fill,
kit-red100 kit-red100
] (3,2) -- (4.5,0.2) -- (6,3); ] (3,2) -- (4.5,0.2) -- (6,3);
% samples % samples
\foreach \x/\y in { \foreach \x/\y in {
0.5/0.5, 0.5/0.5,
1.5/1.5, 1.5/1.5,
2.5/2.5, 2.5/2.5,
3.5/2.5, 3.5/2.5,
5.5/0.5 5.5/0.5
} }
\node[fill = yellow] at (\x,\y) {}; \node[fill = yellow] at (\x,\y) {};
\node[ \node[
fill = yellow, fill = yellow,
fill opacity = 0.4, fill opacity = 0.4,
] at (4.5,1.5) {}; ] at (4.5,1.5) {};
\end{tikzpicture} \end{tikzpicture}
\caption[edge sampling]{edge sampling} \caption[edge sampling]{edge sampling}
\end{figure} \end{figure}
\end{minipage} \end{minipage}
\caption{Sampling a single pixel. Calculate gradient with respect
to green triangle moving up. Measure white part of pixel vs. green part.}
\end{figure}