Convert polylines to continuous tubes using interpolated scalar data to scale and colour the tubes.
Name | Type | Description | |
lines | Mesh | Polyline cell_set | |
data | Mesh+Node_Data | Data used for interpolation | |
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 |
Colour Component | int | Node_Data component to use for tube colour | Radio Box |
Scale Component | int | Node_Data component to use for tube scaling | Radio Box |
Name | Type | Description | |
out_fld | Mesh+Node_Data | Tubes with one scalar node_data component. | |
out_obj | GDobject | Directly renderable output object. | |
This macro takes a Polyline Mesh and a 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 with is scaled using the Scale Component node data and oriented in the direction of the polyline at that node. The scale parameters allow control over the overall width of the tube. The Colour Component node data is mapped appropriately to each node of the cross section. This results in colour mapped tubes that vary in width according to two separate node data components.
Internally the macro uses the DVinterp_data module to apply the node data from the data field to the Polyline mesh. This combined Polyline field is then processed by the low-level BlendyTubesCore module to generate the output tubes. Internally the macro also automatically scales the data to the dimensions of the Mesh. This ensures the generated tubes always appear at a sensible scale even when the user switches between data-sets with widely differing ranges.
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 blendy_tubes macro. An example of doing this is provided with the Isoline2Polyline project.
lines
Input Mesh that should contain a cell_set of type Polyline. This mesh should describe the path that you wish the generated tubes to take.
data
Input Field that should have at least one scalar node_data component. The data will be interpolated so that it matches the nodes of the polylines and then used for scaling and colour mapping. Normally this input will be connected to the original data before it has being processed by visualization modules. Alternatively if the lines input also has node data that input can be connected to provide node data.
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. It should be noted that the scaling factor that is set in the User Interface is processed before being given to the BlendyTubesCore module. This allows the blendy_tubes macro to automatically scale the input node data so that the generated tubes are of a consistent size.
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'.
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.
Scale Component
Specifies which of the components of node data should be used to size each section of the tube.
Colour Component
Specifies which of the components of node data should be used to colour map each section of the tube.
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.
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.
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 read the 'bluntfin data set. However it only generates a series of colour mapped tubes around each streamline.
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.
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.
James S. Perrin : james.perrin@man.ac.uk, Manchester Visualization Centre
Ian Curington, AVS Inc. Andrew Dodd International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL