[Sidefx-houdini-list] rotating a rotation
Drew Whitehouse
Drew.Whitehouse at anu.edu.au
Tue Oct 17 16:54:40 EDT 2006
A bit of math,
If you have a rotation matrix R and a point p_old, then you rotate
p_old by multiplying by R i.e.
p_new = R p_old (1)
Now assume we have a transform matrix T, that describes a change of
space such that our points p_old and p_new now become q_old and q_new
in the new space. (eg T could be a simple -90 rotation matrix about
the X axis to flip from Z up to Y up).
q_old = T p_old (2)
q_new = T p_new (3)
then we want to find the new matrix M where
q_new = M q_old (4)
M will be our transformed rotation matrix.
Now,
q_new = T p_new
= T R p_old (from 1)
= T R inverse(T) q_old (from 4)
Hence our new matrix
M = T R inverse(T)
Note that for a pure rotation the inverse of the matrix is the same as
it's transpose so we can say
M = T R transpose(T).
-Drew
On 10/17/06, Peter Robbinson <probbins at corefa.com> wrote:
> I vaguely remember many moons ago you could switch what axis is up in
> one of the startup scripts.
> I could be imagining things though.
>
> PeterR
>
> Ben Schrijvers wrote:
>
> >Hi Dan,
> >
> >Uhm.. yes obviously it was the most obvious. Indeed same swapping and
> >inverting as the translate channels. I didn't swap the rotation order though
> >which made me think the solution would be a lot more complex and maybe need
> >a matrix.
> >
> >Uhm.. I couldn't find it so I gave up hope already but anyone able to
> >confirm that you can't switch Houdini to a Z-up system?
> >
> >Having fun over here? Well as my question is about DOP's and converting
> >coordinate systems you can geuss I do feel at home :-)
> >
> >Cheers,
> >benS
> >
> >-----Original Message-----
> >From: sidefx-houdini-list-bounces at sidefx.com
> >[mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of Dan Seddon
> >Sent: Monday, October 16, 2006 7:33 PM
> >To: sidefx-houdini-list at sidefx.com
> >Subject: Re: [Sidefx-houdini-list] rotating a rotation
> >
> >Hi Ben
> >
> >Hope you're having fun back in the Nether Netherlands.
> >
> >If you can do a channel swapping trick for the translation you should be
> >able to do if for rotation too - though you'll need to swap the rotation
> >order around too. Without checking I would imagine you should
> >interchange your rotation orders in the same order you interchange each
> >of your transforms (given that you ts rs and ss should match too),
> >though you'll need to make sure you get your signs correct for the
> >rotations (which is determined by the handedness or your coordinate system).
> >
> >Hop that gives you enough to play with, if you're not already there.
> >
> >Dan
> >
> >
> >
> >>Hi there,
> >>
> >>
> >>
> >>I've got to rotate some channels that where generated in DOP's.
> >>
> >>As it's quite a simple rotation I can rotate the translation channels by
> >>swapping them.
> >>
> >>But that doesn't work for the rotation channels.
> >>
> >>I've tried the Transform Chop which does give me new rotation values but I
> >>can't find the right ones.
> >>
> >>
> >>
> >>Anyone?
> >>
> >>benS
> >>
> >>_______________________________________________
> >>Sidefx-houdini-list mailing list
> >>Sidefx-houdini-list at sidefx.com
> >>https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >>
> >>
> >>
> >
> >_______________________________________________
> >Sidefx-houdini-list mailing list
> >Sidefx-houdini-list at sidefx.com
> >https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> >_______________________________________________
> >Sidefx-houdini-list mailing list
> >Sidefx-houdini-list at sidefx.com
> >https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> >
> >
> >
>
> --
> Peter Robbinson
> Trainer
> robbinson at coredp.com
> probbins at corefa.com
>
> Core Digital Pictures
> http://www.coredp.com/
>
>
>
>
> "gravity is not a force, it is a boundary layer"
> "everything is coincident"
> "Love: a state of suspended anticipation"
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>
--
Drew Whitehouse
ANU Supercomputer Facility Vizlab
More information about the Sidefx-houdini-list
mailing list