objectgraphics/
vis_transformpoint.pro
object graphics
includes main-level programTransforms a point by a transformation matrix.
Examples
For example, let's rotate a point 90 degrees about the x-axis. The
easiest way to specify the transformation matrix is with an IDLgrModel:
IDL> model = obj_new('IDLgrModel')
IDL> model->rotate, [1, 0, 0], 90
Next, use the model created to transform [0, 1, 0]:
IDL> print, vis_transformpoint([0, 1, 0], model)
0.0000000 -3.8285687e-16 1.0000000
This example is included as a main-level program at the end of this file
and can be run by typing:
IDL> .run vis_transformpoint
top vis_transformpoint
result = vis_transformpoint(point, ctm)
Transforms a point by a transformation matrix.
Return value
fltarr(3)
Parameters
- point in required type=fltarr(3)
point in data coordinates
- ctm in required type=object or fltarr(4, 4)
either a transformation matrix or an object with a getCTM method
File attributes
| Modification date: | Thu May 5 16:03:10 2011 |
| Lines: | 56 |
| Docformat: | rst rst |