[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dear C.l.i-p,

  I have a problem, and I *think* that MESH_DECIMATE may be
my solution, but I'm a little confused.  This function was
introduced in IDL 5.3, which is also the version I am using.

   Here is the deal: I have a huge matrix of simulated data
in three dimensions.  It's big enough that 3D wireframes are
too dense (like solid black), and need to be thinned out.  One
solution is to sample the data.  This has several appealing
aspects.  The data in this case are regularly-gridded so the
mechanics of sampling are simple.  And since I am simulating
the data anyway, I could actually just program the thing to output
less data but to output the correct average of n points, which is
even better than just sampling.

    But before I do that, I thought I would take MESH_DECIMATE
out for a spin.  But I have become confused (what else is new?)
if this is really the function I want.  My data are a rectangular
array of z-values, which I plot using the SURFACE procedure (DG).
The data start of as a list of (x,y,z) triplets, R*C long. Following
advice I got about a year ago from this newsgroup, I convert the
data into three separate R*C arrays using the REFORM function.
The z array is the actual data, and the x and y arrays make sure
the axes are labeled correctly.  All I want to do is thin out the
z array and make a new, less dense, surface out of it.

   The syntax of MESH_DECIMATE is:
Result = MESH_DECIMATE (Verts, Conn, Connout [, /VERTICES]

Verts=Input array of polygonal vertices [3, n].
Conn=Input polygonal mesh connectivity array.
Connout=Output polygonal mesh connectivity array.

Now, Conn is going to be my z-data (???), and Connout will be the
decimated surface.  I'm quite confused about Verts.  My vertices
are just my simulated data points, so for should I feed to Verts
my original list of (X,Y,Z) triplets???  I'm having trouble
visualizing this.  Even if I can get a nicely-thinned-out z-array,
what happens to my x and y arrays?

Usually I test things on small datasets before I do it on a big
dataset---but how do I decimate a 3x3 array? :-0

Beore I just go back to sampling the data, I'd be grateful if
someone out there who has become an expert in MESH_DECIMATE could
point me in the right direction.  For regularly gridded data, I'm
beginning to think that MESH_DECIMATE may be overkill---but I'd be
interested to learn if this is incorrect.



Sent via Deja.com http://www.deja.com/
Before you buy.