IROTATE

Syntax | Arguments | Keywords | Examples | Version History | See Also

The IROTATE procedure rotates an iTool visualization. You can rotate an object in only one dimension at a time. The rotation value is specified by the Degrees argument, and the axis of rotation is specified by the XAXIS, YAXIS, or ZAXIS keyword.

This routine is written in the IDL language. Its source code can be found in the file irotate.pro in the lib/itools subdirectory of the IDL distribution.

Syntax

IROTATE, Id, Degrees, [, /RESET] [, TOOL=iToolID] [, /XAXIS] [, /YAXIS] [, /ZAXIS]

Arguments

Id

The identifier of the object to rotate. If you pass a partial identifier, the IGETID function is called to retrieve the full identifier string.

Degrees

The number of degrees to rotate the object. Positive values represent clockwise rotation as if looking along the positive axis. Degrees is required unless RESET is set.

Keywords

RESET

Set this keyword to reset the current rotation before applying any inputs.

TOOL

Set this keyword to the identifer of the iTool in which ID is found. If not supplied, the current iTool is used.

XAXIS

Set this keyword to rotate the object around the X axis.

YAXIS

Set this keyword to rotate the object around the Y axis.

ZAXIS

Set this keyword to rotate the object around the Z axis (the default behavior).

Examples

In the following example, we draw a surface data set with the iSurface iTool, and rotate the image around the x axis.

; Read the data from surface.dat
file = FILEPATH('surface.dat', $
   SUBDIRECTORY = ['examples', 'data'])
data = READ_BINARY(file, DATA_DIMS = [350, 450], DATA_TYPE = 2, $
   ENDIAN = 'little')

; Plot the data
ISURFACE, data, TITLE = 'Maroon Bells Elevation', $
   COLOR = [255, 128, 0]
; Insert a dialog box to pause the flow of action
result = DIALOG_MESSAGE('Click OK to rotate.', /INFORMATION)

; Rotate the image 45 degrees around the x-axis
IROTATE, 'surface', 45, /XAXIS

Version History

7.1

Introduced

See Also

IGETID, ISCALE, ITRANSLATE, IZOOM, Rotation (iTool User's Guide).