Re: IDL ROT function [message #30924] |
Tue, 28 May 2002 15:27  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
James Kuyper <kuyper@gscmail.gsfc.nasa.gov> writes:
> David Fanning wrote:
>> Alok Nagdev (nagdev@csee.usf.edu) writes:
>>
>>
>>> I have a big image 2160x1440 pixels. After rotating the image
>>> by arbitary amount a square image turns into a parallelogram.
>>
>>
>> Uh, my math isn't what it used to be after that fall I
>> took at the last IDL Expert Programmer's Association
>> annual gala, but doesn't "square" mean that it has the
>> same number of pixels on all sides. :-(
> No, not if !D.X_PX_CM NE !D.Y_PX_CM. Furthermore, it is the rhombus that
> has all four sides equal. Whether or not it's a square also depends upon
> the angles, and not just the lengths of the sides.
ROT is a purely mathematical function. It doesn't know anything about screen
parameters. It would make sense, though, if there were a way to pass in
asymmetric scale parameters as a keyword. Unfortunately, the current
implementation doesn't have this feature (or at least not in v5.4). It
wouldn't be hard, though, to add it in. The source code is available at
$IDL_DIR/lib/rot.pro, and shouldn't be hard to modify. You could probably even
get RSI to implement your changes in future releases.
William Thompson
P.S. My, my! It's been many years since I ran into a graphics device that had
non-square pixels. That takes me back!
|
|
|