The CONVERT_COORD function transforms one or more sets of coordinates to and from the coordinate systems supported by IDL.
The input coordinates X and, optionally, Y and/or Z can be given in data, device, or normalized form by using the DATA, DEVICE, or NORMAL keywords. The default input coordinate system is DATA. The keywords TO_DATA, TO_DEVICE, and TO_NORMAL specify the output coordinate system.
If the input points are in 3D data coordinates, be sure to set the T3D keyword.
| Warning |
Result = CONVERT_COORD( X [, Y [, Z]] [, /DATA | , /DEVICE | , /NORMAL] [, /DOUBLE][, /T3D] [, /TO_DATA | , /TO_DEVICE | , /TO_NORMAL] )
The result of the function is a (3, n) vector containing the (x, y, z) components of the n output coordinates.
A vector or scalar argument providing the X components of the input coordinates. If only one argument is specified, X must be an array of either two or three vectors (i.e., (2,*) or (3,*)). In this special case, X[0,*] are taken as the X values, X[1,*] are taken as the Y values, and, if present, X[2,*] are taken as the Z values.
An optional argument providing the Y input coordinate(s).
An optional argument providing the Z input coordinate(s).
Set this keyword if the input coordinates are in data space (the default).
Set this keyword if the input coordinates are in device space.
Set this keyword to indicate that the returned coordinates should be double-precision. If this keyword is not set, the default is to return single-precision coordinates (unless double-precision arguments are input, in which case the returned coordinates will be double-precision).
Set this keyword if the input coordinates are in normalized space.
Set this keyword if the 3D transformation
Set this keyword if the output coordinates are to be in data space.
Set this keyword if the output coordinates are to be in device space.
Set this keyword if the output coordinates are to be in normalized space.
Convert, using the currently established viewing transformation, 11 points along the parametric line x = t, y = 2t, z = t2, along the interval [0, 1] from data coordinates to device coordinates:
; Establish a valid transformation matrix: SURFACE, DIST(20), /SAVE ; Make a vector of X values: X = FINDGEN(11)/10. ; Convert the coordinates. D will be a (3,11) element array: D = CONVERT_COORD(X, 2*X, X^2, /T3D, /TO_DEVICE)
Introduced: Pre 4.0