simple_tubes

Synopsis

Converts polylines to continuous tubes using scalar data to colour and optionally scale the tubes. Provides a simplified version of the blendy_tubes user macro.

Input Ports

Name Type Description

lines Field Polyline cell_set and node data.

Parameters

Name Type Description UI Control

facets int Number of sides the tubes have. Slider
scale float Overall scaling of tubes. Slider
offsetScale boolean Offset scaling values of tubes. Toggle
invertScale boolean Invert scaling of tubes. Toggle

Output Ports

Name Type Description

out_fld Mesh+Node_Data Tubes with one scalar node_data component.
out_obj GDobject Directly renderable output object.

Description

This macro takes a Polyline Field with at least one node_data component and creates a continuous tube for each polyline. For each node in the polyline a circular cross section is created and oriented in the direction of the polyline at that node. If two node_data components are present the second node_data component is used to proportionally scale each circular cross section. The scale parameters allows control over the overall width of the tube. The first node_data component is mapped appropriately to each node of the cross section. This results in colour mapped tubes that optionally vary in width according to the two separate node data components.

It is expected that the input polyline mesh will be generated by the Streamlines module, however other sources of data can be used. For instance the isoline module generates data with a Line cell set. By using the Isoline2Polyline module the output of the isoline module can be used as the input to the simple_tubes macro. An example of doing this is provided with the Isoline2Polyline project.

Input Ports

lines

Input Field that should contain a cell_set of type Polyline and at least one scalar node data component. This Polyline mesh describes the path that you wish the generated tubes to take. The first node data component will be used to colour map the tube sections. If a second node data component is present it will be used to scale each section. Any other node data components will be ignored. The node data can be of any scalar data type.

Parameters

facets

Number of sides the tubes will have. The generated tubes require at least 3 facets.

scale

An overall scaling factor to control the width of the tubes. This parameter is always used and is not dependent upon whether scaling node data is present or not.

offsetScale

If the scale node data component contains negative values and Offset Scale is on the scaling values will be shifted so they are all positive and therefore all start from zero. If Offset Scale is off negative values will cause the tubes to turn themselves 'inside-out'. This parameter is ignored if no scaling node data is present.

Invert Scale

If Invert Scale is on then the scale node data component values will be inverted, hence larger values will produce narrower tubes and versa-versa. The scale parameter will still work as before as this overall scaling is applied after the data component scaling. This parameter is ignored if no scaling node data is present.

Output Ports

out_fld

Output field containing a Mesh with a Quad cell_set that forms the generated tubes and one scalar node data component that is used for colour mapping the tubes.

out_obj

The GDobject version of the field output, suitable for direct connection to a viewer.

Utility Macros

The BlendyTubesFunc functional macro uses the low-level BlendyTubesCore module. The blendy_tubes user macro uses this functional macro and the BlendyTubesUI user interface macro. The simple_tubes user macro also uses this functional macro and the SimpleTubesUI user interface macro. The BlendyTubesParams parameter block is used to transfer data between each of these macros.

Example

Two example applications are provided with this project. The BlendyTubesEg application reads the 'bluntfin' data set and generates a series of streamlines to visualize the air flow. The blendy_tubes macro is then used to generate a series of colour and size mapped tubes around each streamline. The SimpleTubesEg application similarly reads the 'bluntfin' data set. However it only generates a series of colour mapped tubes around each streamline.

Files

iac_proj/blndtube/blndmods.v contains the V definitions of the BlendyTubesCore low-level module and the BlendyTubesParams parameter block.

iac_proj/blndtube/blndmacs.v contains the V definitions of the SimpleTubesUI and BlendyTubesUI user interface macros, the BlendyTubesFunc functional macro and the simple_tubes and blendy_tubes user macros.

iac_proj/blndtube/blndapps.v contains the V definition of the SimpleTubesEg and BlendyTubesEg example applications.

Other Notes

It is realised that the cross section of the tubes should be elliptical. However this would require further rotations to be carried out to orientate it correctly. The major use of the module is likely to be with Streamlines. As these tend to be 'smoothy' curved with short line segments it was decided that a circular cross section would be a sufficient approximation.

The BlendyTubesMacs library inherits its process. As this library contains no procedural code, the process is not important. The modules in the low-level BlendyTubesMods library execute under the process specified in that library, not the process defined in the high-level library.

Author

James S. Perrin : james.perrin@man.ac.uk,
Manchester Visualization Centre

Modifications

Ian Curington,
AVS Inc.

Andrew Dodd
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also