[vtkusers] Transform axes
David Gobbi
david.gobbi at gmail.com
Wed Nov 5 23:34:28 EST 2014
Hi Gib,
If I'm reading your question correctly, then what you are looking
for is very easy to achieve.
To transform an object from its canonical x,y,z axes onto a
new set of orthogonal axes, all you need is to set the first three
columns of a 4x4 matrix to those axes.
if the axis vectors are u, v, and w, then the transform matrix is
u_x, v_x, w_x, 0,
u_y, v_y, w_y, 0,
u_z, v_z, w_z, 0,
0, 0, 0, 1
No algebra involved!
- David
On Wed, Nov 5, 2014 at 5:47 PM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:
> Hi all,
>
> This is a 3D geometry problem, one that many people must have solved. I
> want to apply a transform to my actor to bring it's local axes (which are
> initially aligned with the global axes) into alignment with a specified
> triplet of orthogonal vectors. In fact alignment with a pair is
> sufficient. I'm hoping that somebody has done this in VTK and can save me
> the trouble of going through the algebra.
>
> Thanks
> Gib
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141105/3f5d0318/attachment.html>
More information about the vtkusers
mailing list