isoline


Synopsis

create contour lines of constant value

Input Ports

in_field

Mesh + Node_Data

ui_parent

user interface parent object

 

Parameters

iso component

UIradioBoxLabel

selects data component to use for isoline

ncontours

UIslider

number of isolines to be produced

level_min

UIslider

minimum isoline level

level_max

UIslider

maximum isoline level

Color

UItoggle

color isolines by value

 

Output Ports

out_fld

Mesh + Node_Data

out_obj

output renderable object

 

Description

isoline creates contour lines of a given level value or values in a field. The contour lines are colored by the level value. The selected component must be scalar. You use isoline when you want to see a graphic depiction of the locations of a particular data value in a field.

Input Ports

in_field

The input is any mesh with Node_Data. The mesh must be a surface (nspace = 2). The surface can exist in 2D or 3D. No checking is done to ensure that the mesh is 2D. 3D meshes do not generate output. At least one of the components must be scalar.

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

iso component

UIradioBoxLabel. A set of radio buttons to pick which component to compute the isolines for. The selected component must be scalar or the message "isoline: first component is not scalar" is written to stderr. The default is the first (0th) component. If node data labels are present, they are displayed in the UIradioBox.

number of contours

UIslider. Number of isolines to produce. The lines are evenly spaced between the min and max levels. Default number is 10.

min level

UIslider. Float slider to set the minimum isoline level. The default is the selected component's min * 0.7 + max * 0.3. The range is from min to max. The data type of the slider is converted to the data type of the node data before use.

max level

UIslider. Float slider to set the maximum isoline level. The default is the selected component's min * 0.3 + max * 0.7. The range is from min to max. The data type of the slider is converted to the data type of the node data before use.

Color

UItoggle. When on, the isolines are colored by the data value. The default is on.

Output Ports

out_fld

The output field is a new unstructured Mesh of cell type Line that represents the contour lines. It has a new Node_Data whose value at each line is the level value of that line.

out_obj

This is a renderable version of the output field.

Algorithm

For each "cell" of the field, a straight line is created connecting locations on the cell's edges with an interpolated value equal to the iso level. The interpolation is linear.

Example

Libraries.Examples.Visualization.Isoline
examples/isol.v

File

v/modules.v

See also

Related modules