\section{Results}\label{sec:results}

\paragraph*{Experimental Method.}

To test the execution time of the algorithm, we used a machine with an
Intel Core i7 processor running at 2.8GHz and 8GB of RAM. In addition,
we used an Nvidia GeForce GTX 480 graphics card.
For these tests, the amount of texture data in GPU memory is
kept constant.

In order to understand the performance of separate parts of the algorithm,
we measure the runtime of the PGM step as well as the entire algorithm. 
In order to see how the view affects the
efficiency of the algorithm, we use three different views shown in \Figure{viewCases}. 
We test a global view of the planet, a view close the planet using low-resolution data, and finally a view close to the planet using high-resolution data of Victoria Crater. 

\begin{figure}
\begin{center}
\begin{tabular}{ccc}
	\includegraphics[width=0.85in]{images/case1.png} &
	\includegraphics[width=0.85in]{images/case2.png} &
	\includegraphics[width=0.85in]{images/case3.png} \\
\end{tabular}
\end{center}
\caption{Three tested views}
\label{fig:viewCases}
\end{figure}

Finally, the problem size is varied with respect to two variables:
the grid size and the screen size.  

\paragraph*{Performance Analysis.}

\pngFigure{02-cases-fps}{!h}{8cm}
	{Total FPS for all three cases.}

\Figure{02-cases-fps} graphs the framerate in frames
per second (FPS) for all three cases. 
As is evident from the graph, all three cases respond similarly to changes in grid and screen size.
In addition, the graph shows that the second test case runs faster than
the first test case and the third test case runs faster than the second
test case. This pattern is exaggerated as both grid size and screen
size approach \res{1024}{1024}. The first test case performs the slowest
because it is a global view, and all of the datasets are visible. The
second and third test cases are close to the terrain, meaning that
texture lookups are both limited to the same textures and cover a smaller
area. This leads to more of a performance benefit from
the caching of texture reads.

The PGM step is unaffected by the dimensions of the screen because
of the nature of the PGM algorithm. However, both the grid size and the screen size affect the
overall performance of the algorithm.  An increase in grid size affects the overall execution time of
the algorithm more than an increase in screen size. This is because the
rasterization step requires the entire projected grid to be rendered as
a triangle mesh at once, thus testing the triangle throughput of the GPU.
