Re: isosurface tetrahedra question.... [message #67931 is a reply to message #67917] |
Fri, 04 September 2009 15:43  |
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.
|
|
|