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

David Doria daviddoria at gmail.com
Tue Dec 11 16:41:59 EST 2012


On Tue, Dec 11, 2012 at 4:34 PM, Gergely Debreczeni <
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/20121211/278f0c70/attachment.htm>


More information about the vtkusers mailing list