comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLgrModel, rotation angles
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLgrModel, rotation angles [message #38122 is a reply to message #38121] Mon, 23 February 2004 11:49 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
lyubo wrote:
>
> Hello,
>
> I have a transformation matrix and I must find the amount of rotation
> in degrees. How can I do that? Any help would be appreciated.
>

Forget previous reply; I was being too complicated. A much simpler
expression for the rotation angle in degrees is:

!RADEG*ACOS(0.5D*(TRACE(rot)-1.0D))

Warning: if the rotation angle is small, the trace might exceed 3.0 due
to round-off error; if it's close to 180 degrees, the trace might be
less than -3.0, for the same reason. If you're sure that roundoff is the
only possible cause of such a problem, the following modification avoids
that problem:

!RADEG*ACOS((0.5D*(TRACE(rot)-1.0D)) <1.0 >(-1.0))
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Array string
Next Topic: Re: HDF frustrations

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:39:17 PDT 2025

Total time taken to generate the page: 1.43920 seconds