DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Translation and Rotation

Hello,

 

I am faced with the challenge of translating some data channels. I have three data channels each with data in the x-axis, y-axis, and z-axis. I need to translate the data along the x-axis and  z-axis. In addition to the translation, I also need to rotate the data about the y-axis. Has anybody written a similar script do accomplish this that they are willing to share? Or does anyone know if I can accomplish this under the DIAdem Analysis tab? I am running DIAdem 2014.

 

Thanks!

 

0 Kudos
Message 1 of 6
(4,123 Views)

Rvillalta319,

 

In general the way to do this would be to matrix arithmetic. I am not as familiar with the math involved as I am with DIAdem, so if you have more specific questions about the matrix operation in DIAdem please let me know and I can assist you with that. I think the following might work for your application though:

 

In term of the translation, you can go ahead and multiple the matrix of data that you currently have by a translation matrix. You can this is DIAdem by go to 3D >> Arithmetic >> Matrix Matrix and then in the properties go to multiply the matrix. You can multiply your data matrix by a translation matrix. For more information about the translation matrix you can reference the following article: http://hotmath.com/hotmath_help/topics/transformation-of-graphs-using-matrices-translation.html.

 

In terms of the rotation, since you have a three dimensional coordinate system you can do a rotation around the y-axis by multiplying the matrix by a rotation matrix. To do this in the Analysis tab of DIAdem, you can go to 3D >> Arithmetic >> Matrix Matrix and then in the properties go to multiply the matrix. You can multiply the matrix that you have of the data with the rotation matrix. For more information about the rotation matrix you can reference the following article under “Basic Rotations”: https://en.wikipedia.org/wiki/Rotation_matrix.

 

 

Sarina
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(4,081 Views)

StarSarina,

 

Thank you for the info. Let's say that I've determined the matrix that I would like to multiply my data matrix by. For example, I would like to multiply my data matrix by the following transformation matrix:

 

Transformation Matrix.PNG

 

How can I input this matrix in order to use the analysis tool to multiply the matices?

0 Kudos
Message 3 of 6
(4,058 Views)

Rvillalta319,

 

I think I understand the question, but please correct me if I misjudged your question.

 

To input a matrix you can do this by placing the data in the Data Portal: Internal Data. You can do this in multiple ways, just for an example I went and ahead and made an excel file with a matrix and brought that into the data portal, this can be your transformation matrix. I made a 2 X 2 matrix and then it showed up in the data portal as “two columns.” With that you can go into the analysis tab 3D >> Arithmetic >> Matrix Matrix. This will allow you to enter in the two Matrixes that you are multiplying. Therefore it would be your data matrix and then the transformation matrix, you can get the matrix by selecting multiple columns. Once you click the matrixes you can click on calculate.

 

Please let me know if this makes sense and helps!

Sarina
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(4,030 Views)

Sarina,

 

I still can't figure it out. This is the exact math involved I wish to accomplish:

 

Capture.PNG

 

Which is the proper way to enter my 3x3 matrix into the data portal in order to multiply the matrices with the matrix-matrix function? In the screenshot below you will see two options (TX,TY,TZ) and (XX,YY,ZZ).

 

Capture2.PNG

 

I wish to multiply the 3x3 matrix with each row of the (x,y,z) array to spit out the new array of data. I hope that makes sense....

0 Kudos
Message 5 of 6
(3,912 Views)

Hi rvillalta319,

 

When viewing the Matrix-Matrix Operations help file, you can see that there are two types of matrix multiplication possible: Algebraic and Componentwise.

 

CaptureForum.PNG

 

It appears that you would want to use the algebraic multiplication type based on this documentation.

0 Kudos
Message 6 of 6
(3,884 Views)