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

Home » Public Forums » archive » POLAR_SURFACE function
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
POLAR_SURFACE function [message #9594] Fri, 25 July 1997 00:00 Go to next message
Jih-Hong Shue is currently offline  Jih-Hong Shue
Messages: 2
Registered: July 1997
Junior Member
Did anyone ever use the POLAR_SURFACE function to
interpolate a surface from polar coorcinates to
rectangular coordinates? I found a problem when
I used this function for my research.
The interpolated surface has a discontinuity
on positive X axis (zero theta). To illustrate this
problem, I have written the following short program.

r=findgen(51)/50.
theta=findgen(25)*15.*!dtor
x=r#cos(theta)
y=r#sin(theta)
z=exp(-r^2)#replicate(1.,25)
zz=polar_surface(z,r,theta,/grid)
surface,z,x,y
window,2
surface,zz
end

After running this program, you can see a spike extending
from the top to the bottom on the interpolated surface.

I am now doing an interpolation from grids in polar
coordinates to another set of grids in polar coordinates.
I was searching for IDL online help, but I found no
procedures or functions which can interpolate the data
in polar coordinates. Thus, I figured out a way--use
POLAR_SURFACE to interpolate grids to retangular
coordinates; and use BILINEAR to interpolate from
old grids to new grids; and hence transform the new
grids in polar coordinates. It seems that the
POLAR_SURFACE function doesn't work for me. Can anyone
offer an alterative way to do this interpolation?

Thank you,
Jih-Hong Shue
jhshue@stelab.nagoya-u.ac.jp
Re: POLAR_SURFACE function [message #9656 is a reply to message #9594] Wed, 30 July 1997 00:00 Go to previous message
Jih-Hong Shue is currently offline  Jih-Hong Shue
Messages: 2
Registered: July 1997
Junior Member
> I had the same problem and solved it by specifying the grid so that no
> points fall on the theta=0. Quite annoying.
> --

Thanks for your solution. It works.
I shifted theta a little bit, i.e., using theta=0.0001
instead of theta=0. In this way, I still can keep
the information at theta=0.

I also traced the source program of POLAR_SURFACE.
It seems that the problem is come from TRIGRID.

Regards,
Jih-Hong
Re: POLAR_SURFACE function [message #9681 is a reply to message #9594] Fri, 25 July 1997 00:00 Go to previous message
Mirko Vukovic is currently offline  Mirko Vukovic
Messages: 124
Registered: January 1996
Senior Member
Jih-Hong Shue wrote:
>
> Did anyone ever use the POLAR_SURFACE function to
> interpolate a surface from polar coorcinates to
> rectangular coordinates? I found a problem when
> I used this function for my research.
> The interpolated surface has a discontinuity
> on positive X axis (zero theta). To illustrate this
> problem, I have written the following short program.
>
> r=findgen(51)/50.
> theta=findgen(25)*15.*!dtor
> x=r#cos(theta)
> y=r#sin(theta)
> z=exp(-r^2)#replicate(1.,25)
> zz=polar_surface(z,r,theta,/grid)
> surface,z,x,y
> window,2
> surface,zz
> end
>
> After running this program, you can see a spike extending
> from the top to the bottom on the interpolated surface.
>
> I am now doing an interpolation from grids in polar
> coordinates to another set of grids in polar coordinates.
> I was searching for IDL online help, but I found no
> procedures or functions which can interpolate the data
> in polar coordinates. Thus, I figured out a way--use
> POLAR_SURFACE to interpolate grids to retangular
> coordinates; and use BILINEAR to interpolate from
> old grids to new grids; and hence transform the new
> grids in polar coordinates. It seems that the
> POLAR_SURFACE function doesn't work for me. Can anyone
> offer an alterative way to do this interpolation?
>
> Thank you,
> Jih-Hong Shue
> jhshue@stelab.nagoya-u.ac.jp
I had the same problem and solved it by specifying the grid so that no
points fall on the theta=0. Quite annoying.
--
Mirko Vukovic, Ph.D 3075 Hansen Way M/S K-109
Novellus Systems Palo Alto, CA, 94304
415/424-4969 mirko.vukovic@varian.grc.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Win The Web Wars
Next Topic: Re: Out of range subscript encountered

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

Current Time: Wed Oct 08 16:01:25 PDT 2025

Total time taken to generate the page: 0.00743 seconds