[vtk-developers] 3x3 rotation matrices

David Doria daviddoria+vtk at gmail.com
Sun Jan 10 13:36:07 EST 2010


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> 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



More information about the vtk-developers mailing list