Michael Raab
2014-08-15 12:09:41 UTC
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div>
<div> </div>
<div>I'm in the progress of developing some scene manipulation widgets. When implementing a scale manipulator I found out that the decomposition behaves not as I expected.</div>
<div>If I try to decompose 2 Matrices which are nearly the same I get a result scale vector that has switch axis. Here's an example:</div>
<div> </div>
<div>Matrix 1:</div>
<div> 1.040 -1.040 0.000 0.000<br/>
0.707 0.707 0.000 0.000<br/>
0.000 0.000 1.000 0.000<br/>
0.000 0.000 0.000 1.000</div>
<div> </div>
<div>Result 1:</div>
<div> Rotation 0, 0, 45</div>
<div> Scale 1.47031, 1, 1</div>
<div> Scale Orientation 0, 0, -0.382683, 0.92388</div>
<div> </div>
<div> </div>
<div>Matrix 2:</div>
<div> 1.046 -1.046 0.000 0.000<br/>
0.707 0.707 0.000 0.000<br/>
0.000 0.000 1.000 0.000<br/>
0.000 0.000 0.000 1.000</div>
<div> </div>
<div>Result 2:</div>
<div> Rotation: 0, 0, 45</div>
<div> Scale: 1, 1.47986, 1</div>
<div> Scale Orientation: 0, 0, 0.382683, 0.92388</div>
<div> </div>
<div>Has someone an explanation for this?</div>
<div> </div>
<div>Thanks,</div>
<div>Michael<br/>
</div></div></body></html>
<div> </div>
<div>I'm in the progress of developing some scene manipulation widgets. When implementing a scale manipulator I found out that the decomposition behaves not as I expected.</div>
<div>If I try to decompose 2 Matrices which are nearly the same I get a result scale vector that has switch axis. Here's an example:</div>
<div> </div>
<div>Matrix 1:</div>
<div> 1.040 -1.040 0.000 0.000<br/>
0.707 0.707 0.000 0.000<br/>
0.000 0.000 1.000 0.000<br/>
0.000 0.000 0.000 1.000</div>
<div> </div>
<div>Result 1:</div>
<div> Rotation 0, 0, 45</div>
<div> Scale 1.47031, 1, 1</div>
<div> Scale Orientation 0, 0, -0.382683, 0.92388</div>
<div> </div>
<div> </div>
<div>Matrix 2:</div>
<div> 1.046 -1.046 0.000 0.000<br/>
0.707 0.707 0.000 0.000<br/>
0.000 0.000 1.000 0.000<br/>
0.000 0.000 0.000 1.000</div>
<div> </div>
<div>Result 2:</div>
<div> Rotation: 0, 0, 45</div>
<div> Scale: 1, 1.47986, 1</div>
<div> Scale Orientation: 0, 0, 0.382683, 0.92388</div>
<div> </div>
<div>Has someone an explanation for this?</div>
<div> </div>
<div>Thanks,</div>
<div>Michael<br/>
</div></div></body></html>