mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

vis/objectgraphics/

mg_transformpoint.pro

object graphics

includes main-level program

Transforms 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, mg_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 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
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.