Contour maps are probably the most common and natural way to visualize a terrain. A contour corresponding to an elevation value h is the intersection between the terrain surface with the horizontal plane of equation z = h. A contour map is formed by a collection of contours at different elevations, where each line is labeled with its elevation. In the context of a TIN model, aech contour consists of a set of polylines.
[ENRICO: QUI C'E' UN COMMENTO DI LEILA CHE NON CAPISCO]
Without lack of generality, we assume to deal with the extraction of a single contour, at elevation h. Contour lines are computed on a (single-resolution TIN) by selecting the triangles containing the given elevation h, finding one segment for each of such triangles, corresponding to the intersection with plane z = h, and then linking the resulting segments into polylines.
On an MT, we use the DAG structure as a spatial index to select just the relevant triangles for a contour. To this aim, we use a uniform LOD threshold to select the desired accuracy of the map, and a focus condition that considers a triangle active if and only if it intersects the plane z = h.
ENRICO: QUESTA PARTE CAMBIATA - MI SEMBRAVA MEGLIO USARE FOCUS CONDITION We define a threshold function in the following way. Let p≡(xp, yp, zp) be a generic point in space, then:
In order to avoid missing some intersection, we artificially assume that a triangle t spans elevation h if plane z = h either intersects t, or it is disjoint from t, but its vertical distance from t is smaller than the elevation error associated with t (see Figure ). The latter situation corresponds to the cases in which t does not contain h, but some triangle refining t may contain it. Intuitively, we can imagine that every triangle t is thickened for an amount equal to its approximation error in order to test the focus condition.
Each triangle containing the given elevation which is returned by the query algorithm is post-processed in order to compute the segment that represents its contribution to the countour. Contour segments sharing an endpoint are then connected into chains. Note that two segments may have a common endpoint only if they belong to adjacent triangles. In order to efficently find contour segments that need to be connected to each other, the TIN extraction algorithm generates adjacency relations among the triangles of the output mesh.
Given a sequence h1,…, hk of elevation values, two approaches can be used to compute the contours for all given elevations:
|
Since a representation of the terrain outside the contours is not of interest, in the first approach we prefer to use the algorithm for local query which extracts only triangles that are active for the given isovalues (see Figure (b)). The second approach can be implemented in a similar way by using a different local query for each isovalue. However, if the given elevations are dense enough, the change in the relevant set of triangles when passing from hi to hi+1 is small, and an approach based on the dynamic algorithm for global query is more convenient. In this case, the focus condition is used to select triangles on which LOD threshold must be evaluated. The result of a global query for a given isovalue is depicted in Figure (a). Table compares the first approach and the two versions of the second approach outlined above. It shows the number of triangles visited by the TIN extraction algorithms while visiting the DAG as a measure of the cost of the process. The first approach turns out to be the least expensive one. As expected, the version of the second approach using local queries is appropriate when the gap between two consecutive elevations in the sequence is large, and the opposite version using global queries answered through the dynamic algorithm becomes more convenient as the gap gets smaller.
[ENRICO: NELLA PARTE PRECEDENTE CI SONO DIVERSI COMMENTI DI LEILA CHE NON CAPISCO]