# Polar Decomposition?

This topic is 2049 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

Fist of all sorry if i posted in a wrong thread..

im working on a project "Meshes Deformation based on shape matching"

my main source is

and i am stuck on the implementation of polar decomposition , where as i understand a rotation matrix needs to be extracted from Linear transformation matrix.

A= RS

im not considering to use any math libraries, and i tried to read up on the subject but it just got too confusing because of my lack of knowledge.

The way Polar decomposition is acheived in the example is with help of Jacobi rotation ...

I Found an Example From NVIDIA, but they have implemented it in HLSL.

If someone can help me to understand some bits of the code that would be enough, the most confusing function is "sign"

i did read about it on microsoft website , but i am still not sure how it is implemented.

or if anyone has suggestions of better implementations, i will be happy to hear them .

(nvidia example attached)

##### Share on other sites

I believe sign() is nothing more than -1, 0, or +1 (for tau < 0, tau==0, tau > 0). I'm guessing about the reason your code uses it, but I've used it in the past to calculate 1/tau without having to worry about division by 0. If the numerator of a division==0, the process ignores the division (i.e., 0 divided by anything = 0).

Edited by Buckeye

##### Share on other sites

... I just realized that the input is a float, i keep thinking it was a Matrix ( it can be as an input) , thats why it was confusing...
ok that one is figured out.

I spent too much time awake... cant even see simple things, i will try to work it out. if i will have problems, i will ask again .

Thanks for Help =)

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 9
• 15
• 9
• 11