newbie question about matrices rotation...

   1344   2   1
User Avatar
Member
46 posts
Joined: March 2015
Offline
Hello there,
I'm new to VEX and matrices manipulation, though I'd like to know more about the subject.

I need the matrix built from custom vectors to be rotated around three axis.

The first thing that comes to my mind is to use Rotate function.
It works almost as I need with one limitation… At least to my knowledge.
It accepts either only one given vector that matrix rotates around or three but oriented globally.

So to make it work with three vectors I apply this function three times. And If i need to include all possible orders of rotation the code become quite long and it looks not very nicely to my eye.
I guess I'm missing something somewhere.

What is actually a good way to get control over the matrix rotation being able to use all three axis ?
User Avatar
Member
7938 posts
Joined: Sept. 2011
Online
If by three axes you mean an Euler rotation, then there is a function for that.

https://www.sidefx.com/docs/houdini/vex/functions/maketransform.html [www.sidefx.com]

https://www.sidefx.com/docs/houdini/nodes/vop/makexform.html [www.sidefx.com]

If you mean three arbitrary axes, then building three individual rotations and multiplying by each is the way, and order does matter.
Edited by jsmack - Oct. 10, 2020 23:54:18
User Avatar
Member
46 posts
Joined: March 2015
Offline
Thanks Jonathan! It worked!
  • Quick Links