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!
|
|
|
Re: IDL ROT function [message #30925 is a reply to message #30924] |
Tue, 28 May 2002 12:53  |
Alok Nagdev
Messages: 11 Registered: April 2001
|
Junior Member |
|
|
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. :-(
>
Well, thanks for noticing that....in haste I lost my mind and made a
square of a rectangle!....so still your math is good!!
-Alok
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: IDL ROT function [message #30926 is a reply to message #30925] |
Tue, 28 May 2002 12:14  |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
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.
|
|
|
Re: IDL ROT function [message #30927 is a reply to message #30926] |
Tue, 28 May 2002 11:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
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. :-(
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|