Re: POLAR_SURFACE function [message #9681 is a reply to message #9594] |
Fri, 25 July 1997 00:00  |
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
|
|
|