The CONVERT_COORD function transforms one or more sets of coordinates to and from the coordinate systems supported by IDL. The result of the function is a (3, n ) vector containing the ( x, y, z ) components of the n output coordinates.
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.
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.
Convert, using the currently established viewing transformation, 11 points along the parametric line x = t , y = 2 t , z = t 2 , along the interval [0, 1] from data coordinates to device coordinates:
X = FINDGEN(11)/10. ; Make a vector of X values.
D = CONVERT_COORD(X, 2*X, X^2, /T3D, /TO_DEVICE)
;
Convert the coordinates. D will be an (3,11) element array.