Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

What mean the transformation matrix, rotation submatrix parameters? 2

Status
Not open for further replies.

ZsZs

Computer
Joined
May 8, 2007
Messages
30
Location
HU
Hi!

I have a C++ program.
I know to moving my components by this transformation matrix, but I like rotating too.

The Solidworks help wrote at the MathTransform Object:

"The SolidWorks transformation matrix is stored as a homogeneous matrix of 16 elements, ordered as shown. The first 9 (a to i) are elements of a 3x3 rotational sub-matrix, the next 3 (j,k,l) define a translation vector, the next 1 (m) is a scaling factor. The last 3 elements (n,o,p) are unused in this context.

The 3X3 rotational sub-matrix represents 3 axis sets: row 1 for x-axis components of rotation, row 2 for y-axis components of rotation, and row 3 for z-axis components of rotations."

Which (value) filling the rotation sub-matrix?
What mean the 3 axis parameter? What contain it?
It is coordinate? or any distance of origin? or...?

Thanks!

ZsZs.
 
To understand the transformation matrix, you must first understand what a unit vector is. A unit vector has a scalar value of 1, thus the sum of the squares of the vector components equals one(i.e. x2 + y2 + z2 = 1). Unit vectors are used to express direction.

The "translation vector" is a unit vector to express the direction of translation. The "scaling factor" is the scalar distance. Scaling factor multiplied by translation vector yield x, y, and z components of total translation.

For rotational submatrix, each row represents the unit vector (= direction) of the transformed x, y, and z axes. If a transformation involves pure translation and no rotation, the rotation vectors are as follows: x=(1, 0, 0); y=(0, 1, 0), z=(0, 0, 1).

[bat]Honesty may be the best policy, but insanity is a better defense.[bat]
-SolidWorks API VB programming help
 
Thanks!
I beleive help me more a example:
If I have a component, and I moving the x=1, y=1, z=1 positions, then I set the transformation matrix 9-11. element = 1.
This is the translation vector. (I don't use the scaling factor.)
I put (move) the component this position (and it is working: the component move the position.)

But, if I want move the component x=1, y=1, z=1 positions AND I like my component rotate by 90 degree to right (center = y-axis)?
What I do?
How I use the rotation sub-matrix?
What is a center of rotation? the assembly file origin? or components origin? or my component center of body? What around rotating?

Sorry my stupid questions...

ZsZs.
 
I haven't idea how able to rotating a component... :-(
 
 
Thanks!!!
This is very good!
I understand the rotation, and set my rotation matrix, and it work! :-)

ZsZs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top