RubberSheet
Category
Realization
Function
Deforms a surface, using the data values of that surface.
Syntax
graph = RubberSheet(data, scale, min, max);
Inputs
Name
| Type
| Default
| Description
|
data
| scalar field
| none
| the field defining the surface
to be deformed.
|
scale
| scalar
| input dependent
| displacement scaling
|
min
| scalar or field
| 0.0
| offset to be applied to the
surface data values
|
max
| scalar or field
| maximum data value
| value used for setting the
maximum displacement
|
Outputs
Name
| Type
| Description
|
graph
| scalar field
| the deformed field
|
Functional Details
This module takes a specified scalar surface or line field and
displaces each point by an amount based on the data value
at that point, as follows:
displacement = scale × (data - min)
(see parameter descriptions).
data
| specifies the surface to be deformed.
|
scale
| is the scale factor used in calculating the displacement.
If this parameter is not specified, the module provides a scale factor
calculated as follows:
scale = (0.1 * diagonal of data boundary box) ÷ (max - min)
If min is a field, the value used is the minimum
data value of that field.
The resulting scale factor is attached to the output object as a
"RubberSheet scale" attribute (which can be extracted
with the Attribute module).
|
min
| is the offset applied to the data values before they are scaled.
|
max
| is used to determine a scale factor according to the formula
shown
above, if scale is not specified.
|
Notes:
- If the input data have no "normals" component (e.g., the
output of Slab), the perpendicular to the first element is
used as the displacement direction.
In that case, for a positive scale factor and a positive data value,
the surface is displaced in the direction given by the right-hand
rule applied to the connections at the surface
(i.e., with the thumb representing the direction of displacement and
the fingers following the order of points in the connections).
- If the input does have a "normals" component, the displacement
at the surface is determined by the dependencies of the data and of
the normals:
- If both the data and the normals are position dependent, the surface
is displaced in the direction of the normal at each point.
- If both are connection dependent, each face of the input is
displaced as a whole in the direction indicated by the normal
for that face.
The amount of displacement is proportional to the data value for that
face.
Additional sides are added to each displaced face to complete the
"box"; box sides are not shared between neighboring
faces.
- If the data are position dependent and the normals are connection
dependent, each face is displaced in the direction indicated by
the normal for that face, but the amount of displacement varies
across the face in proportion to the data value.
Additional sides are added to each displaced face to complete the
"box"; box sides are not shared between neighboring faces.
- If the data are dependent on connections and the normals are
dependent on positions, the displaced faces will be parallel
to the original faces, displaced by an amount proportional
to the data value for that face.
Additional sides are added to each displaced face to complete the
"box"; box sides of neighboring faces are coincident.
- If the input data are 1- or 2-dimensional, an additional dimension
is added in the resulting graph.
- If no colors are present, the module adds a default color.
-
RubberSheet automatically adds shading to the output
graph.
Components
Creates new "positions" and "connections" components.
All other components, with the exception of "normals,"
are propagated to the output.
Example Visual Programs
AlternateVisualizations.net
RubberTube.net
ThunderGlyphSheet.net
UsingSwitchAndRoute.net
SIMPLE/Rubbersheet.net
See Also
FaceNormals,
MapToPlane,
Normals,
Slab