[vtkusers] Combination of geometry and particle datasets

이제형 jehglee at hyundai-motor.com
Fri Dec 26 00:58:47 EST 2008


Hi !

I am trying to write vtk input file(*.vtk), which has geometry(points, cells, vector, temperature) and particles(position, size) data.

However both data have different points sizes.

How can I combine the data in one file? In general each vtk legacy format has only one defined dataset type(unstructured_grid, polydata) with a constant points/cells size. 

Any information(approach methods, simple examples or experiences) to make the input vtk file or to program a C++ code would be very much appreciated.

Best Regards,

Je-Hyung Lee, Dr.-Ing.

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

example data;

# vtk DataFile Version 3.0
Cube Unstructured Grid CUBE Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS  8  float
  0.0  0.0  0.0
  1.0  0.0  0.0
  1.0  1.0  0.0
  0.0  1.0  0.0
  0.0  0.0  1.0
  1.0  0.0  1.0
  1.0  1.0  1.0
  0.0  1.0  1.0

CELLS 1 9
8  0  1  2   3  4  5  6  7

CELL_TYPES 1
12

POINT_DATA 8
SCALARS scalars float 1
LOOKUP_TABLE default
0. 1. 2. 3. 4. 5. 6. 7. 8.
------------------------------------

# vtk DataFile Version 3.0
Cube Unstructured Grid Particle Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS  10  float
  0.1  0.2  0.1
  0.2  0.3  0.6
  0.3  0.5  0.3
  0.4  0.4  0.5
  0.5  0.6  0.6
  0.7  0.5  0.3
  0.5  0.2  0.5
  0.2  0.3  0.4
  0.3  0.9  0.2
  0.4  0.4  0.5


CELLS 10 20
1 0  1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9

CELL_TYPES 10
1 1 1 1 1 1 1 1 1 1 

 POINT_DATA           10
 SCALARS diamteter float
 LOOKUP_TABLE default
  1.2  4.0  2.1  5.3  6.3  7.5  8.5  9.7  6.1 2.5
---------------------------------------------

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081226/58d97bdc/attachment.htm>


More information about the vtkusers mailing list