isosurface_trace


Synopsis

create a local surface of constant value at a picked probe location

Input Ports

in_field

Mesh_Struct + Node_Data

probe

Grid

ui_parent

user interface parent object

 

Parameters

iso component

UIradioBoxLabel

selects data component to isosurface

map component

UIradioBoxLabel

data component to map onto isosurface

iso level

UIslider

report isosurface level OUTPUT ONLY

 

Output Ports

out_fld

Mesh_Struct + Node_Data isosurface

 

out_obj

obj

renderable isosurface object

 

Description

isosurface_trace is similar to isosurface. It creates a surface of a given level value in a field at a probe position. This probe position is picked interactively with the left mouse button or specified through a Transformation Editor. This surface is, in effect, a 3D contour.

isosurface_trace differs from isosurface in that it does not isosurface the entire volume of the field. Rather, beginning from the picked position, it builds an isosurface by checking the values of adjacent cells until either no more adjacent cells have the same value, it hits the limits of the field, or the surface is closed. Thus, isosurface_trace creates local isosurfaces.

The isosurface of one component is colored by the value of the selected map component (for example, the isosurface of density colored by temperature). That map component is also written to the output Node_Data.

Input Ports

in_field

The input is any Mesh_Struct (Mesh_Struct, Mesh_Rect, or Mesh_Unif) with Node_Data. At least one of the components must be scalar.

probe

Grid. This input is a Grid representing any kind of probe object. Such objects are found in Geometries, such as Arrow, or Cross3D. In turn, the probe macro icon's red input port must connect to the renderer's picked_obj red output port.

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 to pick which component to isosurface. The selected component must be scalar or the message "iso: 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.

map component

UIradioBoxLabel to pick a component that will map onto the isosurface (for example, map pressure value onto a density isosurface). The selection does not have to be scalar. The default is the first (0th component). If node data labels are present, they are displayed. Where the isosurface does not exactly intersect a node, the data value is linearly interpolated based on the surface's distance from the adjacent nodes.

iso level

UIslider. This widget is an output display only. It ignores input. A float slider that reports the value found at the picked location for which an isosurface has been drawn.

Output Ports

out_fld

The output field is an unstructured Mesh of cell type Tri that represents the 3D contour surface. Its Node_Data is the interpolated values of the map component along the isosurface.

out_obj

This is a renderable version of the output field.

Algorithm

isosurface_trace uses the Marching Cubes algorithm to construct the isosurface. See W. Lorensen and H. Cline, "Marching Cubes: A High Resolution Surface Reconstruction Algorithm." Computer Graphics 21(4) (SIGGRAPH Proceedings, 1987), July, 1987, pp. 163-169.

This algorithm has a known limitation. There are cases where there are two possible paths that the isosurface could take through a cell, and only one is the correct path. If isosurface picks the wrong path, a discontinuity appears as a hole in the surface.

Example

Libraries.Examples.Vizualization.Iso_Trace
examples/isotrc.v

File

v/modules.v

See also

Related modules