Terrain Deformation Software
The steps to applying the TDS are outlined here.
The Correction Space Mesh (csm) is created by generating a list of vectors
obtained by querying the periphery of each target (the "bottom" of which is
determined somewhat arbitrarily and assumed at this stage to be flat).
The corners of the terrain block to be deformed are then added to the list
of vectors. The list of vertices is then triangulated, resulting in a list
of triangles deemed the CSM.
This Correction Space Mesh will then be used to compute a correction function for each triangle in the CSM, which can then be applied to any point on the terrain falling withing the periphery that triangle.
The terrain block is traversed and all triangles are tested for a fit to the
curvature of the correction function in the CSM. That is, each edge is tested
for deviation of the altitude of the linear interpolation between the end points
at the center and the altitude would the correction function be applied at the
center. The result is the subdivision of triangles that do not adequately
represent the curvature of the terrain with the correction function applied.
It is important to note that the subdivision of triangles does not apply the correction function yet. Subdivisions are made in latitude and longitude only and the altitude at each newly generated point is the linear interpolation between the end points. The reason for this is that the correction function must be applied only once to all points, or multiple corrections will occur with negative results.
Once new coordinates have been generated for the triangle subdivisions, the correction function may then be applied. Each of the points in the terrain is placed within the triangle of the CSM it corresponds to, and the correction function is then applied to the point and the altitude of the point is corrected to conform to the new position.
Before re-triangulating, a two steps are taken to insure further quality.
The following provides a visual representation of progress on the terrain deformation algorithm.
Please click here for a demonstration.