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

Home » Public Forums » archive » closed surface
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
closed surface [message #32213] Thu, 19 September 2002 10:30
Chunlei Liu is currently offline  Chunlei Liu
Messages: 4
Registered: August 2002
Junior Member
Dear all,

I am trying to construct a closed polygonal surface from some scattered
points in 3D space. The IDL routine SURFACE won't work in this case, since
it doesn't handle a closed surface. I am trying to TRIANGULATE the lon,
and lat in spherical coordinate as following,

-------------------------------------
; Create array to hold vertices
vertexlist = dblarr(3, 200)
; Create some random longitude points:
vertexlist[0, *] = RANDOMU(seed, 200) * 360. - 180.
; Create some random latitude points:
vertexlist[1, *] = RANDOMU(seed, 200) * 180. - 90.
; Set z to uniform value
vertexlist[2, *] = 300

Triangulate, vertexlist[0, *], vertexlist[1, *], $
tri,CONNECTIVITY=connect,/degrees
vertex = CV_COORD(From_Sphere=vertexlist, /To_Rect, /degrees)
oSurf = OBJ_NEW('IDLgrPolygon', vertex, polygon=connect, STYLE=2, $
SHADING=1, COLOR=[0,20,255])

oGroup = OBJ_NEW('IDLgrModel')
oGroup->Add, oSurf
XOBJVIEW,oGroup

---------------------------------------------

In the above example, the object is surposely a sphere, however the
resulting 'sphere' has a very rough surface, looks like a diamond instead.
I am suspecting it is because of the incorrect connectivity, but I don't
how to correct them.


Another related problem, if I try to interpolate the date using TRIGID as
following, my IDL gave me error message in TRIANGULATE when I tried to
store SPHERE to a named variable myS.

--------------------------------------------
--> Triangulate, vertexlist[0, *], vertexlist[1, *], $
tri,CONNECTIVITY=connect,/degrees,FVALUE=myF,SPHERE=myS
^^^^^^^^^^

GS = [180.0/50.0,180.0/50.0]
limits = [0.0,0.0,360.0,180.0]
gridedData = TRIGRID( myF, GS,limits,SPHERE=myS, XGrid=xvector, $
YGrid=yvector, /DEGREES,/QUINTIC )

-------------------------------------------


The error message says,
% Attempt to store into an expression: <DOUBLE Array[1, 200]>.

Appreciate any help,hints,tips....
Chunlei
[Message index]
 
Read Message
Previous Topic: Displaying data in 3 coodinates
Next Topic: IDL Student Edition released

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

Current Time: Thu Oct 09 19:48:44 PDT 2025

Total time taken to generate the page: 0.00459 seconds