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

Home » Public Forums » archive » Re: ROT is ROTTEN
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: ROT is ROTTEN [message #28081 is a reply to message #28079] Tue, 20 November 2001 22:06 Go to previous message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
Bhautik Jitendra Joshi wrote:
>
> MOO>a=findgen(5,5) & print, a
> 0.00000 1.00000 2.00000 3.00000 4.00000
> 5.00000 6.00000 7.00000 8.00000 9.00000
> 10.0000 11.0000 12.0000 13.0000 14.0000
> 15.0000 16.0000 17.0000 18.0000 19.0000
> 20.0000 21.0000 22.0000 23.0000 24.0000
>
> MOO>print, total(a)
> 300.000

> MOO>print, total(rot(a,360))
> 262.000
>

Well, this is interesting! In IDL5.5, I get 262.000 on Windows98 and
Tru64.
In IDL5.4 on Windows, I get 247.000, but 262.000 on Tru64.
Anyone with earlier versions want to weigh in
here? It is hard to see why a rotation of 360 would not give you
what you started with, unless I am really missing something
fundamental...

(I just compared the source code on the 5.4 and 5.5 lib versions of rot
and they are identical except in the comment fields...)

Now if you do:
IDL> print,total(rot(dindgen(5,5),360.d0))
242.00000
IDL> print,!version
{ alpha OSF unix Compaq Tru64 5.5 Aug 28 2001 64 64}

IDL> print,total(rot(dindgen(5,5),360.d0))
282.00000
IDL> print,!version
{ x86 Win32 Windows Microsoft Windows 5.5 Aug 28 2001 32 64}

and here is a nice one... if you put the angle in integer degrees, you
get
one answer, in double precsission, you get another...
IDL> print,total(rot(dindgen(5,5),360))
262.00000
IDL> print,total(rot(dindgen(5,5),360.d0))
242.00000
IDL> print,!version
{ alpha OSF unix 5.4 Sep 25 2000 64 64}

I modified rot.pro to do things in double precision but it did not make
any difference. I agree that when you turn on /cubic you don't get
300.00, but something close to it. I have not displayed the images
to see what they look like, but it surely is not doing what we think
it should!

Dick
French
[Message index]
 
Read Message
Read Message
Previous Topic: Rotation
Next Topic: Calling C++ from IDL

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

Current Time: Wed Oct 08 13:07:40 PDT 2025

Total time taken to generate the page: 0.00237 seconds