[vtkusers] visualizing 2d surface as a collection of 1d graph

Gergely Debreczeni Gergely.Debreczeni at cern.ch
Wed Dec 12 04:22:26 EST 2012


Hi David !

I had a look to this link.
The way as it creates the PolyLine seems slow for me for my problem

I have a grid like 2000 x 1000, i.e. I want to plot 1000 polyline of
2000 element long.

Is there a faster way for this ? I need min 10 fps but 20-25 would be
better. (Time dependent simulation.)

thans,
Gergely

________________________________
From: David Doria [daviddoria at gmail.com]
Sent: 11 December 2012 22:41
To: Gergely Debreczeni
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] visualizing 2d surface as a collection of 1d graph

On Tue, Dec 11, 2012 at 4:34 PM, Gergely Debreczeni <Gergely.Debreczeni at cern.ch<mailto:Gergely.Debreczeni at cern.ch>> wrote:
Hello,

I have a grid as a result of simulation x,y,z.

I want to visualize it in a way that for every y value a
solid line as a function of of x,z is plotted.

With other words I'd like to visualize the x,y,z surface
but interpolating only in the x direction, so that graphs
belonging to different y value can be distinguished from
each other despite being close.

What is the best VYK object and visualisation method
to use for the purpose ? DensArray ? PointCloud ?

thanks a lot for your help in advance,
Gergely

I would loop over the rows of your grid and create polylines with the points being your (x,z) values and the y coordinate being a counter (which of course you should scale so the spacing makes sense relative to the magnitude of your data). You can create the polylines like this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/PolyLine). You could even do something like alternate the color of every other polyline so they are easier to distinguish.

Hope that helps,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121212/c8f852bb/attachment.htm>


More information about the vtkusers mailing list