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

Home » Public Forums » archive » rotating contour lots
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
rotating contour lots [message #25887] Thu, 26 July 2001 04:05 Go to next message
ahw199 is currently offline  ahw199
Messages: 6
Registered: July 2001
Junior Member
I am trying to rotate a set of contours about 10 degrees, I understand
that I have to use the ROT command but I can't seem to get this to
work. All it seems to do is rotate the plot about 90 degrees and
squash the contours. Does anyone have any idea what I am doing wrong?
Re: rotating contour lots [message #25926 is a reply to message #25887] Mon, 30 July 2001 08:51 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Craig Markwardt wrote:

> * It may be easier to rotate the contours afterwards. You would
> extract the contours using the PATH_INFO and PATH_XY keywords to
> the CONTOUR procedure, and then apply a simple rotation
> transformation like:
> c = cos(theta) & s = sin(theta)
> xp = x*c + y*s
> yp = -x*s + y*c

I think I am going to set up a newsgroup filter called "Craig", and
redirect everything Craig writes to a folder "Geom_advice", where I will
look every time I plan to use a coordinate transformation. You know, I
studied all this before (I think) and even had an A+. But it is very
hard when you forget something that you actually never really new :-(

Cheers,
Pavel
Re: rotating contour lots [message #25972 is a reply to message #25887] Thu, 26 July 2001 10:45 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
ahw199@soton.ac.uk (Ann Webber) writes:

> I am trying to rotate a set of contours about 10 degrees, I understand
> that I have to use the ROT command but I can't seem to get this to
> work. All it seems to do is rotate the plot about 90 degrees and
> squash the contours. Does anyone have any idea what I am doing wrong?

Having little information, here are some ideas:

* you should either rotate the image beforehand, or the contours
afterward. ROT is for images; why are you using it on the contours?

* ROT does have an ANGLE parameter which can be set to any angle, not
just 90 degrees (were you really talking about the ROTATE
function?) Again, this is for images, not contours.

* It may be easier to rotate the contours afterwards. You would
extract the contours using the PATH_INFO and PATH_XY keywords to
the CONTOUR procedure, and then apply a simple rotation
transformation like:
c = cos(theta) & s = sin(theta)
xp = x*c + y*s
yp = -x*s + y*c

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: re: Better outwit CDROMs now or Lloyd will usably locate them beside you.
Next Topic: PSConfig (or Retiring Announcement)

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

Current Time: Thu Oct 09 14:26:13 PDT 2025

Total time taken to generate the page: 1.51749 seconds