[vtkusers] How to rearrange scalar data to dataset ?

ckchen@CIS ckchen.cis89g at nctu.edu.tw
Thu Dec 23 03:19:39 EST 2004


Hi~  I have some problems to show the x-y-value (carpet) plot.
The original VTK file format seems not support the following carpet plot (if I am wrong, please tell me):
x, y, z1, z2, z3
x, y, z1, z2, z3
...
x and y are the coordinates of the point, z1,z2,z3...are the scalar data from the 2D simulator.
To display the simulated results in carpet style from original VTK file, the z-axis should be dummy value, and replace the z-axis data with scalar data. 
For example, if the point data and scalar data are:
+++++++++++++++++++++++
POINTS   4   double
0.0 0.0 0.0     
0.0 1.0 0.0     
1.0 0.0 0.0     
1.0 1.0 0.0

POINT_DATA 4
SCALARS  scalars  double 1
LOOKUP_TABLE default
1.0    2.0    3.0    4.0
+++++++++++++++++
How can I replace z-axis by scalars to get the carpet dataset such as: 

POINTS 4 double
0.0 0.0 1.0     
0.0 1.0 2.0     
1.0 0.0 3.0      <--- z axis are replaces by "scalars".
1.0 1.0 4.0

Thx ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041223/a4624162/attachment.htm>


More information about the vtkusers mailing list