# Eye-Tracking in Interactive Virtual Environments: Implementation and Evaluation
## 3 Implementation
### Data Visualization and Related Algorithms
Then, as all the individual points are processed, they are colored with a color gradient according to their assigned values (e.g., gray/invisible = below the threshold of consideration; light gray = minimum amount of gaze concentration; red = maximum amount of gaze concentration). The heatmap visualization can take the form of colored geometric primitives (e.g., a small sphere for each _point of fixation_, as depicted in Figure 10), which is a simple, albeit crude implementation. A more challenging implementation entails visualizing the heatmap as an overlay texture or as a custom graphics shader (i.e., decal system or decal shader [84]). This, however, requires a complex and constrained implementation, because most 3D scenes are composed of multiple objects that contain multiple overlapping textures, some of which use complex texture shaders (the object heatmap overlay is a shader that can interfere with other shaders). Since designing a 3D scene for use with a heatmap overlay texture requires adapting the scene creation process to the heatmap's constraints and involves increasing implementation costs, the present paper disregards the use of overlay heatmap textures. **Corrected heatmap algorithms** (relative distance) are more suitable for obtaining spatial information in VR eye-tracking data with user movement in the virtual space. This is a valid correction in which point-to-point distances are determined according to an observed angular distance rather than an absolute metric distance. Interpreting absolute point-to-point distances projected onto varying spatial depth in a non-corrected heatmap algorithm can be alleviated, to an extent, by a simple implementation of cut-out distances. Computing an absolute-distance, uncorrected heatmap while including only the points of fixation that were observed within a specified distance interval will discard the remainder of the points from processing and visualization. While this procedure is simple, it does not solve the root cause of the problem--the need to interpret sequences of _PoF_ data with a high variety of absolute distances (e.g., just like looking down the corridor in Figure 10). Thus, environments with high spatial variance (or  
Figure 10: A basic, geometric primitive-based heatmap visualization algorithm. The point of fixation coordinates in the eye-tracking log are visualized into the scene as geometric primitives (spheres). These are colored according to the number of other points in the vicinity of each point (gray = lowest concentration, red = highest concentration). with user-induced movement causing such variance) are not fit to be interpreted by the uncorrected (absolute distance) algorithm. The corrected heatmap works well for all distances since it uses conecast. Cone projection from the user's position covers the eye-tracking _point of fixation_ coordinate and its surroundings. The angular width of this conecast can be specified according to the algorithm's parameters. Only the surrounding points captured within the cone are then considered for the corrected heatmap computation (this also helps tremendously with the issue of optimizing the otherwise exponentially rising difficulty for the algorithm, where each point would require measurement of its distance from all the other points). However, because the points are compared to each other in relative distances, it implies that the difference in user movement will lead to different results. _For example, comparing points A-B may determine that they are within a sufficiently close distance, whereas comparing points B-A may yield the opposite, especially when the gaze produced to generate log entry B was taken from a shorter distance, where the cone's angular distance would not protrude sufficiently far from point B to include point A._ Another issue is that of occlusion, in which a varying camera angle/position conecast may not register some points previously looked at.