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

Home » Public Forums » archive » Rotten behavior with rot command
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Rotten behavior with rot command [message #21189] Thu, 17 August 2000 00:00
Michael Baca is currently offline  Michael Baca
Messages: 5
Registered: October 1999
Junior Member
I have been experiencing a problem using the rot command. After reading
through some code to find an error with a rotated array, I checked the data
created by the rot command. If I create a simple array, and then rotate it,
this is what I find:

a=findgen(3,3)
print, a
0.000000 1.00000 2.00000
3.00000 4.00000 5.00000
6.00000 7.00000 8.00000

print, rot(a,180,/interp)
8.00000 7.00000 6.00000
5.00000 4.00000 3.00000
1.00000 0.000000 0.000000

This is obviously not the answer I wanted, let alone the correct answer.
In all cases, the arrays I am rotating are odd-by-odd squares, so at 180
degrees, I should see an array that has been flipped horizontally and
vertically. Defining the point of rotation does not appear to help. I have
tried the above example on multiple arrays with different sizes and always
see this occur.

Has anyone else experienced this problem and had any success working around
it? Right now, the only way I can work around this problem is to find when a
rotation is done in a 90 degree interval and then use the rotate command
instead. But, this will not help when I need to rotate something, say, 170
degrees. Then the same error than causes the problem at 180 degrees still
lingers. This problem also appears at other 90 degree intervals:

print, rot(a, 90, /interp)
1.00000 5.00000 8.00000
0.000000 4.00000 7.00000
0.000000 3.00000 6.00000

Thanks for any thoughts.

Mike Baca

Michael Baca
Frontier Technology, Inc.
mbaca@bos.fti-net.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Rotten behavior with rot command
Next Topic: Re: Ghost object

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

Current Time: Wed Oct 08 19:35:12 PDT 2025

Total time taken to generate the page: 0.00637 seconds