summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-01-11 01:57:42 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-01-11 01:57:42 (GMT)
commit190044203a3f9acd47f39f47edc0c23f8ddc323d (patch)
tree5a2a91cbd88c799348b5806f1f88d830f3c4f71f
parenteb520bbea7ec25409aaf9b2590019c6d0ec5b4a4 (diff)
download2iv35-190044203a3f9acd47f39f47edc0c23f8ddc323d.zip
2iv35-190044203a3f9acd47f39f47edc0c23f8ddc323d.tar.gz
2iv35-190044203a3f9acd47f39f47edc0c23f8ddc323d.tar.bz2
crazy! dude CRAZY
-rw-r--r--Smoke/report/chapter7.tex55
1 files changed, 19 insertions, 36 deletions
diff --git a/Smoke/report/chapter7.tex b/Smoke/report/chapter7.tex
index f4ad82e..fef2fbb 100644
--- a/Smoke/report/chapter7.tex
+++ b/Smoke/report/chapter7.tex
@@ -1,76 +1,59 @@
\chapter{Height plots}
-This chapter treats a very neat visualization technique, namely the height plots. What are height plots, what are they used for and how did we implement them? \\
+Height plots are a very neat visualization technique. What are height plots, what are they used for and how did we implement them? \\
\section{Description}
-All the previous discussed methods are implemented on a 2D grid. But sometimes it's also useful to see the value not by it's color but by the height of the surface.
-This is exactly what a height plot does. It maps the values onto the Z-axis. This means that, initially, you won't see much differences between the version with and
-without the high plots implemented. This is because of the height that is being drawn onto the Z-axis that runs towards the screen. \\
+All the previous discussed methods are implemented on a 2D grid. But sometimes it's also useful to see the value not by its color but by the height of the surface. This is exactly what a height plot does, it maps the values onto the Z-axis. Since the simulation uses a top down view, not much can be seen. Even with lightening and shadows it still left to be desired. \\
-To make the height more visible, we implemented a method to rotate the field by dragging the mouse over the screen while holding the middle mouse button. This way
-you can see the height of the field. \\
+By rotating the field the height plots become much more visible. Rotation is achieved by dragging the mouse over the screen while holding the middle mouse button or scroll wheel, this however only controlls the yaw and the pitch. Rolling can easily be done by using the shift key in addition to the mouse button. The shift key can also be used on the left mouse button to move the field up and down, left and right. This all becomes helpfull when using the scroll wheen to zoom in and out. \\
\section{Implementation}
-First of all we implemented the method to rotate the field by mouse. Without this useful functionality, the height would'nt be that visible. After we implemented
-this feature we added the height to the program. \\
+Realizing height plots would not be very visible from the default view, rotation, zoom and movement was implemented first. After having the ability we costructed the height plots as follows. \\
-We created the height by adding an extra Z-coordinate to each value. We created an extra array that would keep track of the height of each vertex. When drawing a
-vertex we used the stored height from the array and render the vertex using that value for the Z-coordinate. \\
+Since vertex allready had x and y-coordinates, all that was needed was to add a z-coordinate. An extra array to track the height of each vertex was used, as the original simulation and its datastructers should not be disturbed. As value for the height any of the primary datasets can be choosen. When drawing a vertex the stored height from the array is then rendered using that value for the z-coordinate. \\
-To see more depth in the picture we also included some ambient and diffuse light to the program. In order to let the light have effect on the surface we calculated
-the normal vector for each vertex. \\
+To see improve the preception of depth in the simulation some ambient and diffuse light was added. In order to let the light have effect on the surface also the normal vector was being calculated and stored for each vertex. \\
\begin {center}
\includegraphics[width=\textwidth]{height_plot.png} \\
Figure 9: A height plot of the density \\
\end {center}
-The above picture (figure 9) shows a height plot of a fluid where the height encodes the density of the fluid. The colormap is also mapped to the density but this
-is not necessarily the case. In the snapshot on the next page (figure 10), the height is visualizing the velocity of the fluid while the colormap shows differences
-in the density. \\
+The above image (figure 9) shows a height plot of a fluid where the height translates to the density of the fluid. The colormap is also mapped to the density but this does not necessarily have to be the case. In figure 10, the height is visualizing the velocity of the fluid while the colormap shows differences in the density. \\
-As you can see from the second height plot, the bright yellow colors are not on the highest point of the height map. This means the density is not always the
-largest where the velocity is high. \\
+It can be seen in the second height plot, the bright yellow colors are not on the highest point of the height map. This means the density is not always the largest where the velocity is high. \\
\begin {center}
\includegraphics[width=\textwidth]{height_plot2.png} \\
- Figure 10: Another height plot, but this time of the velocity \\
+ Figure 10: Velocity height plot \\
\end {center}
\subsection{Normal vector}
-For the calculation of the normal vector for a given vertex, say $ v_0 $, we first take the two neighboring vertices in that cell, $ v_{1} $ and $ v_{2} $. We take
-the difference of $ v_0 $ with $ v_1 $ and of $ v_1 $ with $ v_2 $. Then we take the cross product of these two differences and normalize the result. This gives us
-the normal vector at $ v_0 $. \\
+To calculate the normal vector for a given vertex, say $ v_0 $, firstly the two neighboring vertices in that cell are taken, $ v_{1} $ and $ v_{2} $. Then the difference of $ v_0 $ with $ v_1 $ and of $ v_1 $ with $ v_2 $ is taken. Lastly the cross product of these two differences is normalized to yield the result. This gives the normal vector at $ v_0 $. \\
-The OpenGL renderer uses this vector to calculate the angle between the normal and the light that is shining on the vertex. This angle is then used to shade a
-vertex and with that an entire surface. \\
+OpenGL uses this vector to calculate the angle between the normal and the light source that is shining on the vertex. This angle is then used to shade a vertex, and with that an entire surface. \\
\section{Difficulties}
-We had some small issues during the implementation of this entire assignment but we managed to implement them correctly. \\
+Some small issues throughout the implementation of this assignment arose, but eventually where implement correctly. \\
\subsection{Rotation}
-The first problem we encountered was due to the rotation of the field. Rotating around one axis was not to difficult. When we tried to rotate the field around two
-or three axis', the simulation wasn't rotating around it's center any more.\\
+The first problem encountered was due to the rotation of the field. Rotating around one axis was not to difficult. When trying to rotate the field around two or three axes, the simulation would not rotate around its center any more.\\
-It turned out we were translating and rotating in the opposite order. When we changed the order of rotating and translating the simulation rotated around it's
-center. \\
+As it turns out the translation and rotation was in the opposite order. After changing the order of rotation and translation the simlation turned properly around the center. \\
\subsection{Height strips}
-When we first tried to implement the height plots we simply added a third dimension when rendering the triangle strips for the smoke visualization. This had as an
-effect that the different rows of the simulation where'nt connected. In stead of a height plots we implemented height strips. \\
+When first implementing the height plots a third dimension was simply added when rendering the triangle strips for the smoke visualization. This had as an effect that the different rows of each of the triangle strips in the simulation where not connected. In stead of a height plots we implemented height strips. \\
-We countered this problem by first calculation the height for each vertex. When rendering a vertex, we look up the correct value for the height. \\
+This problem was countered first calculating the height for each vertex and storing it in an array. When rendering a vertex, the correct value is then retrieved from the array to correctly display the height. \\
-\subsection{Calculating the normal}
+\subsection{Calculating the normal vector}
-When enabling the light in our program and adding the normal to each vertex we had some crazy outcome. This was because of the fact we did'nt consistently took the
-left and lower neighbor of a vertex to calculate the normal vector. As a result each vertex was randomly pointing up or downwards. This looked like some sort of
-checkers board. \\
+When enabling the light in our program and adding the normal to each vertex there where some strange result. Because of the fact thatthe left lower neightbor was not concistently evaluated to calculate the normal vector. As a result each vertex was randomly pointing up or downwards, resulting in something that could be best explained as a checkers board. \\
-We rendered the normal vectors and immediately saw the cause of the problem. It was simply solved by always taking the same neighboring vertices. \\
+When rendering the normal vectors the cause of the problem became immediatly visiable and it was quickly resolved. \\