Path: news.mathworks.com!not-for-mail
From: "James Tursa" <aclassyguywithaknotac@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: angle from rotation matrix
Date: Mon, 17 Dec 2007 20:57:15 +0000 (UTC)
Organization: Boeing
Lines: 44
Message-ID: <fk6nrb$5i3$1@fred.mathworks.com>
References: <fjvbqk$gbt$1@fred.mathworks.com> <fk0cpd$g0v$1@fred.mathworks.com> <fk0iq9$k0j$1@fred.mathworks.com> <fk59hv$n5r$1@fred.mathworks.com> <2shcm3pkforks50k3jjkjo0bdkioir9jq2@4ax.com> <fk6eis$ra6$1@fred.mathworks.com>
Reply-To: "James Tursa" <aclassyguywithaknotac@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1197925035 5699 172.30.248.35 (17 Dec 2007 20:57:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 17 Dec 2007 20:57:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:442835


"Roger Stafford" 
<ellieandrogerxyzzy@mindspring.com.invalid> wrote in 
message <fk6eis$ra6$1@fred.mathworks.com>...
>        :
> This is not the case I was worried about!  It 
> is when the value of theta for the final transformation 
turns out to be near pi 
> that there will be accuracy problems.
> 
>   I have run an example to demonstrate this.
>       :
>   Specifically, Bruno's second method yields:
> 
>  u =
>    0.52590972519131
>    0.57957398286389
>    0.62250538900196
> 
> which is markedly different from the original value, v, 
along the true axis of 
> rotation:
> 
>  v =
>    0.52801689681105
>    0.57601843288478
>    0.62401996895852
> 
> The components of u are off from those in v in the third 
decimal place, which 
> can hardly be considered robust computation.
> 
> Roger Stafford

Got it! Thanks. I should have realized this from your 
earlier post.

I would still point out that the quaternion code (with the 
atan2 modification) that I posted earlier is robust for 
small angles and produces the same result as the eig() 
function on your example A matrix. Maybe I will spend the 
effort to code this up with better MATLAB syntax.

James Tursa