[vtkusers] Drawing half a million "vtkParametricEllipsoid"s

David Doria daviddoria at gmail.com
Thu May 23 14:35:38 EDT 2013


On Thu, May 23, 2013 at 12:49 PM, VoodooCode <MaxSchererMax at gmail.com> wrote:
> I got another question.
>
> I can use the tensor : RotationMatrix * RotationMatrix as the rotation, is
> this right?
> And the tensor: ScaleX, 0, 0, 0, ScaleY, 0, 0, 0, ScaleZ to scale an object,
> is this right too?
>
> I cannot figure out how to combine them, so that I have a single tensor for
> rotation and scaling.


Why would you use R*R instead of just R?

I've never actually used this, but from what I understand from the
documentation it interprets the columns of the tensor as the axes of
the glyph. That is, if you have:

1 0 0
0 .7 -.7
0 .7 .7

You will get a 45 degree rotation around x, and no scaling. If you had

2 0 0
0 .7 -.7
0 .7 .7

you should get a scale factor of 2 in the (new) x-direction. It should
be equivalent to

SR

where S is a diagonal scaling matrix and R is your rotation matrix. In
this case, it would be

S =
2 0 0
0 1 0
0 0 1

(http://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)

David



More information about the vtkusers mailing list