vis/objectgraphics/
mg_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
IDL> print, mg_transformpoint([0, 1, 0], model)
0.0000000 -3.8285687e-16 1.0000000
IDL> .run mg_transformpoint
Routines
top mg_transformpoint
result = mg_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: | Wed May 14 15:07:15 2014 |
Lines: | 11 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.