summaryrefslogtreecommitdiffstats
path: root/Smoke/report/chapter6.tex
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:31:15 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:31:15 (GMT)
commit0ce08ace350d6cc856304a428896c4477876159c (patch)
tree04733a0a2569ae5910446a48e4d59e64a087f512 /Smoke/report/chapter6.tex
parenta570135d7b6167a56f98ee392fea8dc943168fd5 (diff)
download2iv35-0ce08ace350d6cc856304a428896c4477876159c.zip
2iv35-0ce08ace350d6cc856304a428896c4477876159c.tar.gz
2iv35-0ce08ace350d6cc856304a428896c4477876159c.tar.bz2
+ verslag
Diffstat (limited to 'Smoke/report/chapter6.tex')
-rw-r--r--Smoke/report/chapter6.tex55
1 files changed, 55 insertions, 0 deletions
diff --git a/Smoke/report/chapter6.tex b/Smoke/report/chapter6.tex
new file mode 100644
index 0000000..dd59860
--- /dev/null
+++ b/Smoke/report/chapter6.tex
@@ -0,0 +1,55 @@
+\chapter{Isosurfaces}
+
+This assignment was a really interesting one. It introduces a method to implement so called isolines. Such an isoline creates a surface that encapsulates a region
+with a value higher than a given threshold. \\
+
+\section{Description}
+
+An isoline is a line that sort to speak follows a given value. If the values of a field ranges from 0 to 1, a good threshold would be 0.6 for instance. The isoline
+visualizes the points that equal the value of 0.6. \\
+
+Our program is able to define the number of contour-lines and the minimum and maximum values in between the isolines are rendered. \\
+
+\section{Implementation}
+
+The algorithm that implements the isolines follows a structured pattern. In pseudo-code it looks like this: \\
+
+\begin{tabbing}
+ for \= (each cell $ c_i $ of the dataset) \\
+ \{ \\
+ \> for \= (each vertex $ v_j $ of $ c_i $) \\
+ \> \> store inside/outside state of $ v_j $ in bit $ b $ of $ status $; \\
+ \> select the optimized code from the case table using $ status $; \\
+ \> for \= (all cell edges $ e_j $ of the selected case) \\
+ \> \> intersect $ e_j $ with the isovalue; \\
+ \> construct the line segment(s); \\
+ \} \\
+\end{tabbing}
+
+So the algorithm passes through every cell and then checks the four cell vertices \{$ v_0 $, $ v_1 $, $ v_2 $, $ v_3 $\} of that cell. Each vertex has it's own
+value. With that value, the algorithm can check if a vertex is inside ($ v_j \geq threshold $) or outside ($ v_j < threshold $) the isosurface. The inside/outside
+state is then stored in a bit. \\
+
+If a vertex, say $ v_0 $ is inside the isosurface, $ v_0 $ is set to 1, else it's left to 0. This is done for all four vertices which results in a 4-bit status.
+This means there are in total 16 different cases in which the isoline can run through a cell. \\
+
+\begin {center}
+ \includegraphics[width=\textwidth]{marching.png} \\
+ Figure 5: The 16 marching square cases \\
+\end {center}
+
+The above image (figure 5) shows the 16 different cases in the marching squares algorithm. A white vertex indicates the vertex is outside the isosurface and black
+indicates the vertex is inside the isosurface. Every inside or outside case has it's counterpart. So we reduces the number of cases down to 8. In case 0 and 15 for
+instance, no lines have to be rendered, yet they are both very different cases. \\
+
+The cases 5 and 10 are both ambiguous cases as becomes clear from the next image (figure 6). \\
+
+\begin {center}
+ \includegraphics[width=100mm]{ambiguous.png} \\
+ Figure 6: Two ambiguous cases in the marching squares algorithm \\
+\end {center}
+
+\section{Difficulties}
+
+The contouring algorithm is very simple to implement. Just follow the instructions of the method. To only trouble we had with this implementation was the
+interpolation of the intersection. \\