summaryrefslogtreecommitdiffstats
path: root/Smoke/report/chapter3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/report/chapter3.tex')
-rw-r--r--Smoke/report/chapter3.tex32
1 files changed, 32 insertions, 0 deletions
diff --git a/Smoke/report/chapter3.tex b/Smoke/report/chapter3.tex
new file mode 100644
index 0000000..4f29bea
--- /dev/null
+++ b/Smoke/report/chapter3.tex
@@ -0,0 +1,32 @@
+\chapter{Color mapping}
+
+In chapter 2 we saw a figure (figure 2) which showed a fluid in motion. The fluid had a very bright grey color. How is this color determined at every vertex?
+
+\section{Description}
+
+The technique that maps a value to a specific color is called color mapping. We already explained that the simulation is divided into a two dimensional array of
+different values. A colormap calculates the color, given a certain colormap function, for every value at a vertex. Example: \\
+
+In figure 2 we saw the smoke using a grey scaled colormap. If we know that the values at the vertices ranges from 0 to 1, we can use the value to determine each
+color aspect, red, green and blue. This means, for each vertex:
+
+$$ red = green = blue = value $$
+
+To be able to reason about the colored images, we added a legend at the top of the screen. The leftmost colors indicate low values and the rightmost colors indicate
+high values. With such a colormap legend, it's easier to understand the produced images and say something about the value of the fluid. \\
+
+You are also able to set the number of used colors. At default this value is set to 256 colors, but you can easily set that amount to 16 using a slider. You will
+see big bands of colors appear. This way, the line between certain values becomes more visible. \\
+
+\section{Implementation}
+
+We implemented a number of colormaps.
+
+\section{Difficulties}
+
+The last mechanisms to implement for this assignment were scaling and clamping. With clamping you let the user set a minimum and maximum for the values. Actual data
+higher than the maximum or lower to the minimum are clamped to the maximum or minimum respectively. \\
+
+The clamping mechanism was a bit more subtle. At every frame, the minimum and maximum values are stored and the entire dataset at the current time moment is mapped
+to the visible colormap. This is not so hard to do, but we had not foreseen that values could also be negative. It wasn't until we implemented the divergence that
+we found this problem. \\