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

Home » Public Forums » archive » Re: isosurface tetrahedra question....
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: isosurface tetrahedra question.... [message #67931 is a reply to message #67917] Fri, 04 September 2009 15:43 Go to previous message
Karl[1] is currently offline  Karl[1]
Messages: 79
Registered: October 2005
Member
On Sep 4, 12:21 pm, ghgm <ghgm2...@gmail.com> wrote:
> Hi there,
>
> I'm trying to create an isosurface of some 3D data and then render it
> using IDLgrPolygon.
>
> OK, so I have my 3D dataset of scalar values.  At each point I have
> the X,Y, and Z coordinates which I've combined to make
> my GEOM_XYZ array....
>
> so here I go:
>
> isosurface,Data_3d,
> 0.5e-18,Outverts,Outconn,geom_xyz=GEOM_XYZ.......... err, tetrahedra
> = ?
>
> I don't understand what else is needed - but apparently tetrahedra
> needs to be defined as well (another array).
>
> Can anyone please tell me what the tetrahedra array is ?
>
> Cheers
>
> George.

If you are happy with your 3d dataset (in a 3D array) implying a
uniform 3D grid in space, you do not need to specify GEOM_XYZ or
TETRAHEDRA.

But if your samples are from a non-uniform distribution in space, you
would specify the location of each sample with a coordinate in
GEOM_XYZ. Since these spatial vertices represent a possibly irregular
volume and not a cube-like shape, you would describe the volume with a
set of tetrahedra. Each tet would be defined by a list of 4 indices
which index into your GEOM_XYZ vertex list.

The simplest possible example is:

4 samples in the data array - 1D is ok. e.g., [4,4,4,5]
4 verts that are not in the same plane into GEOM_XYZ e.g., [[0,0,0],
[1,0,0],[0,1,0],[0,0,1]]
Set TETRAHEDRA to [0,1,2,3].

If you set the isovalue to 4.5, you should get a triangle back out
where all the Z coords are 0.5.

If all you are starting with is a 3d dataset of samples, then the
uniform grid approach will probably suffice. It is redundant and
unnecessary to generate vertices (and tet lists) if the data is on a
uniform grid. Note that you can scale the returned vertices to map
them from sample space to your viewing space.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idl routines callable from c-programs
Next Topic: IDL & HDF-5 files: Reading attributes at (unknown) list elements

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

Current Time: Fri Oct 10 03:08:11 PDT 2025

Total time taken to generate the page: 0.00582 seconds