The COORD2TO3 function returns a three-element vector containing 3D data coordinates given the normalized X and Y screen coordinates and one of the three data coordinates. Note: A valid 3D transform must exist in !P.T or be specified by the PTI keyword. The axis scaling variables, !X.S, !Y.S and !Z.S must be valid.
This routine is written in the IDL language. Its source code can be found in the file
coord2to3.pro
in the
lib
subdirectory of the IDL distribution.
To return the data coordinates of the mouse, fixing the data Z value at 10, enter the commands:
CREATE_VIEW ; Make sure a transformation matrix exists.
CONVERT_COORD , CREATE_VIEW , CV_COORD , SCALE3 , T3D