[vtk-developers] 3x3 rotation matrices

Aashish Chaudhary aashish.chaudhary at kitware.com
Sun Jan 10 13:45:15 EST 2010


David,

So the conversion depends upon what this 3x3 represents...if it is 3x3 with
homogeneous coordinate then it wont be like you described in 2). If this
matrix is  a part of 4x4 (so in general 3x3 is representing transformation
such as rotation and scaling)  then yes 2) would work. Also if this 3x3 has
w  != 1 then there may or may not be a need of dividing the 4x4 components
by this.

~ my 2 cents.


On Sun, Jan 10, 2010 at 1:36 PM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Sun, Jan 10, 2010 at 1:14 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
> > Is this a hypothetical question or do you have a specific need? You
> > can always extract a 4x4 and create your  own 3x3 in your application.
> > vtk does not have a vtkMatrix3x3.
> >
> > Bill
> >
> > On Sun, Jan 10, 2010 at 1:08 PM, David Doria <daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>>
> wrote:
> >> On Sun, Jan 10, 2010 at 1:03 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
> >>> vtk uses homogenous coordinates. Why extract a 3x3?
> >>>
> >>> Bill
> >>
> >> If you are implementing an algorithm that has a 3x3 multiplication and
> >> you want to create a rotation matrix. Or for creating a 2d rotation in
> >> homogeneous (now 3d) coordinates. If there is a Matrix3x3 class, you
> >> should be able to create common matrices in that type, no?
> >>
> >> Thanks,
> >>
> >> David
>
> I do have a specific application. I am dealing with camera projection
> matrices (3x4) and to create parts of them (the left 3x3) it seems
> easier to deal directly with 3x3's instead of having to keep
> extracting a 3x3 from a 4x4.
>
> This is the 3x3 matrix class I was referring to:
> http://www.vtk.org/doc/nightly/html/classvtkMatrix3x3.html
>
> I think we need 3 things:
> 1) Add RotateX(), RotateY() and RotateZ() to vtkMatrix3x3
> 2) Convert a 3x3 to a 4x4 (adding a 1 in the (4,4) position and zeros
> elsewhere) - where should this function live?
> 3) Convert a 4x4 to a 3x3 by simply extracting the upper left 3x3 -
> where should this function live?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100110/ec456020/attachment.html>


More information about the vtk-developers mailing list