ASPECTOS MÁS DESTACADOS DE LOS ESTUDIOS ESPECIALES
RETOS Y OPORTUNIDADES PARA LOS PAÍSES EN DESARROLLO
The Transform operator manipulates a 2D or 3D database’s coordinate field by applying rotation, scaling, and translation transformations. The operator’s transformations are applied in the following order: rotation, scaling, translation. The Transform operator is applied to databases before they are plotted. You might use the Transform operator to rotate database geometry to a more convenient orientation or to scale database geometry to make better use of the visualization window. You can also use the Transform operator to make objects rotate and move around the visualization window during animations. This works well when only one part of the visualization should move while other parts and the view remain fixed. An example of the Transform operator is shown in Figure 4-58.
3.26.1 Rotation
You can use the Transform operator to rotate plots around an arbitrary axis in 3D and around the Z-axis in 2D. To apply the rotation component of the Transform operator, be sure to check theRotate check box in theTransform operator attributes window
(Figure 4-59). An origin and normal are needed to specify the axis of rotation. The origin serves as a reference point for the object being rotated. The axis of rotation is a 3D vector that, along with the origin, determines the 3D axis that will serve as the axis of rotation. You must supply an origin and an axis vector to specify an axis of rotation. To change the origin, type a new 3D vector into the topOrigin text field. To change the 3D axis, type a new 3D vector into theAxis text field. Both the origin and the axis are represented by three space-separated floating point numbers.
When applying the Transform operator to plots, you probably want to make the origin the same as the center of the plot extents which can be found by looking at the axis
annotations. When the Transform operator is applied to 3D plots, the axis of rotation can
Figure 4-58: Transform operator example
126 Operator Types be set to any unit vector. When the Transform operator is applied to 2D plots, the axis of rotation should always be set to the Z-axis (0 0 1).
Once you specify the axis of rotation, you must supply the angle of rotation. The default angle of rotation is zero degrees, which gives no rotation. To change the angle of rotation, enter a number in degrees or radians into theAmount text field and click theDeg radio button for degrees or theRad
radio button if the angle is measured in radians.
3.26.2 Scale
You can use the Transform operator to scale plots. Each dimension can be scaled independently by entering a new scale factor into theX, Y, Ztext fields. Each scale factor is a multiplier so that a value of 1 scales plots to their original size while a value of 2 scales plots to twice their original size. To apply the scale component of the Transform operator, be sure to check theScale check box in theTransform operator attributes window. All dimensions are scaled relative to a scaling origin which can be changed by typing a new origin into the middle lower
Origin text field.
3.26.3 Translation
You can use the Transform operator to translate plots. To apply the translation component of the Transform operator, be sure to check theTranslate check box in theTransform operator attributes window. To translate plots in the X dimension, replace the default value of zero in theX translation text field. Translations in the Y and Z dimensions are handled in the same manner.
3.26.4 Coordinate system conversion
In addition to being able to rotate, scale, and translate plots, the
Transform operator can also perform coordinate system conversions. A plot’s coordinates can be specified in terms of Cartesian, Cylindrical, or Spherical coordinates (illustrated in Figure 4-60). Ultimately, when a plot is rendered in the visualization window, its coordinates must be
Figure 4-59: Transform operator
attributes window
Figure 4-60: Cartesian, Cylindrical, and
Operator Types 127 specified in terms of Cartesian coordinates due to the implementation of graphics
hardware. If you have a database where the coordinates are not specified in terms of Cartesian coordinates, you can apply the Transform operator to perform a coordinate system transformation so the plot is rendered correctly in the visualization window. Figure 4-61 shows a model of an
airplane that is specified in terms of spherical coordinates. When it is rendered initially, VisIt assumes that the coordinates are Cartesian, which leads to the plot getting stretched and tangled. The Transform operator was then applied to convert the plot’s spherical coordinates into Cartesian coordinates, which allows VisIt to draw the plot as it is intended to look.
The Transform operator allows coordinate system transformations between any of the three supported coordinate systems, shown in Figure 4-62. To pick a coordinate system transformation, you must first pick the coordinate system used for the input geometry. Next, you must pick the desired output coordinate system. In the example shown in Figure 4-61, the input coordinate system was Spherical and the output coordinate system was Cartesian. Note that if you use the Transform operator to perform a coordinate system transformation then you cannot also perform rotation, scaling, or translation. If you must perform any of those operations, add a second Transform operator to your plots.
Figure 4-61: Coordinate system conversion using the
Transform operator
Figure 4-62: Supported coordinate
128 Operator Types