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

Home » Public Forums » archive » problem with hidden lines in SURFACE in IDL version 5.5 and 5.6
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
problem with hidden lines in SURFACE in IDL version 5.5 and 5.6 [message #34851] Wed, 23 April 2003 07:56
Kristian Kjaer is currently offline  Kristian Kjaer
Messages: 58
Registered: June 1998
Member
I used to enjoy a barely-documented feature of the IDL SURFACE
procedure:
If the data are on a 'topologically rectangular' grid, then I could use
the SURFACE procedure on them without the need to TRIGRID the data onto
a strictly rectangular grid.
However this feature seems to be broken since version 5.5.
Do y'all see the same, and does anyone know a work-around?

I try to avoid TRIGRID because
* it is slow,
* it interpolates the data points (bad!), and
* it used to give a one-half pixel offset to the data, although I think
this has been fixed in IDL 5.x

- Kristian


; Document a problem with hidden lines in SURFACE in IDL version 5.5 and
5.6:

; Make up some surface data:
x=-2.447+findgen(204)/203*(16.3659+2.447)
y=14.0+findgen(181)/180*(18.5-14.0)
z=1/(1+(x/8)^4)#(1/(1+(y-16.5)^6))*2500

; Plot the data:
surface,z,x,y,ax=45,az=-30,/hor

; It also works to have x and y the same SIZE as z:
xx=x#(1+y-y)
yy=(1+x-x)#y
; Plot the data. This looks the same as before:
surface,z,xx,yy,ax=45,az=-30,/hor

; Apply the following nonlinear transformation:
kvec=4.81949
degree=!pi/180.
xxx =kvec*sin(xx*degree)
yyy =kvec*sqrt(1+cos(xx*degree)^2-2*cos(xx*degree)*cos(yy*degree ))

; Now xxx and yyy are not on a rectangular grid.
; One could use trigrid etc. to interpolate to a new rectangular grid.
; However, the following is much easier and faster, and it
; also works correctly in IDL through version 5.3:
surface,z,xxx,yyy,ax=45,az=-30,/hor

; However, in IDL5.5 and IDL5.6, the hidden lines come out wrong.
[Message index]
 
Read Message
Previous Topic: Re: METEOSAT navigation
Next Topic: Not Sure about widget hierarchy ??

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

Current Time: Wed Oct 08 19:57:23 PDT 2025

Total time taken to generate the page: 0.00523 seconds