[vtkusers] plot height field figure

zhixiu li zhixiuli at gmail.com
Fri Apr 20 23:13:49 EDT 2012


Thank you. But the method in the second link still can't make a 3D plot. I
can draw a color plot and save it as png file and the read this png file
then make a 3D plot. But I think there should be easier way to make a 3D
plot.


On Fri, Apr 20, 2012 at 6:25 PM, David Doria <daviddoria at gmail.com> wrote:

> On Fri, Apr 20, 2012 at 5:48 PM, zhixiu li <zhixiuli at gmail.com> wrote:
>
>> Dear All,
>> I have a dataset like this (in data.txt)
>> 1 0 0
>> 2 0 0
>> 1 2 3
>> 1 2 3
>> ...
>> the 1st column is x and the second col is y. the last column is the
>> attribute of this point. I want to make a 3 D plot for each points(Z will
>> the attribute value).
>> How do I read this data file to VTK? Thank you very much!
>>
>> tianbu
>>
>
> Using a reader like this:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader
>
> Will assume that the 3 values are XYZ coordinates. You can then color the
> points by their Z value using this:
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120420/cb60535e/attachment.htm>


More information about the vtkusers mailing list