surf_optimize


Synopsis

produce an optimized (in terms of biggest possible triangles) triangular mesh from a 2D uniform elevation data field

Input Ports

in_field

Mesh_Unif+Dim2+Node_Data

ui_parent

user interface parent object

 

Parameters

tolerance

UIslider

the maximum allowed deviation of the resulting triangular mesh

 

Output Ports

out_fld

Mesh+Node_Data

out_obj

output renderable object

 

Description

The surf_optimize module is used to optimize 2D uniform meshes with a scalar node data component. The node data is assumed to be an elevation (height) at each grid point. This type of mesh is typically used in GIS applications where it is called a Digital Elevation Model (DEM).

The module creates a mesh containing "optimum" triangles. In this usage, the term "optimum" means that the largest possible triangles that satisfy a specified tolerance criteria are met. The tolerance determines the maximum difference of elevations between any point in the output triangular mesh and the corresponding point of the input mesh. That is, the output surface of the elevation lies within the specified tolerance from original surface of elevation.

This module is used to create a coarse mesh in the regions where the surface of elevation changes gradually and a fine mesh in the regions where the surface changes rapidly. Increasing the tolerance results in a less accurate mesh containing fewer triangles and thus leads to a corresponding improvement in rendering performance. The surf_optimize module does not produce the elevation surface itself, it just creates a flat triangular mesh that can be extruded into a surface of elevation produced using the surf_plot module (see surf_plot ). The algorithm used in this module is described in: Automatic Generation of Triangular Irregular Networks using Greedy Cuts by Claudio T. Silva, Joseph S. B. Mitchell and Arie Kaufman, Visualization 95 Proceedings.

Input Ports

in_field

The input must contain a 2D uniform mesh with a scalar node data.

ui_parent

A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)

Parameters

tolerance

UIslider. A float slider to adjust the accuracy of the output mesh and the number of triangles generated. Increasing tolerance results in a less accurate mesh containing fewer triangles and thus leads to a corresponding improvement in rendering performance. The default is 10% of the difference between the max and min elevation values.

Output Ports

out_fld

The output field contains a triangular mesh with a elevation node data.

out_obj

A renderable version of the output field.

Example

Libraries.Examples.Visualization.Surface_Optimize
examples/surf_opt.v

File

v/modules.v

See also

Related modules: