[vtkusers] How to generate a 3D surface from a regular 2D array of elevations?

Chuck Anderson cda10 at psu.edu
Wed May 23 16:48:32 EDT 2007


Hi Steve,

If your points are a regular raster of points (like a DEM) you can read the
data in as image data, use the ImageDataGeometryFilter and WarpScalar
functions to make the surface, and then color with a lookup table or drape
with imagery. If your grid size is not too big, you can do the above for
each sequence data step and then write a loop that sequentially turns on and
off actor visibility. If you are interested, I can send you a script I have
that does this.


Cheers,
Chuck

--------------------------------------
Chuck Anderson
Visualization and Outreach Specialist
Center for Environmental Kinetics Analysis (CEKA)
Penn State
2217 EES Building
814-863-2049
cda10 at psu.edu




> I¹ve ordered the three books but in the meantime I¹m subsisting on online and
> the docs installed with vtk.  Beginners¹ question:  Is there an example of the
> following?  I want to read in a regular 2D array of double float values and
> display it as a 3D surface, where the 2 indices for each array element
> represent a location on the earth¹s surface  and the value of each element
> represents an elevation.  In fact, I want to be able to display a sequence of
> surfaces (representing a corresponding sequence of 2D arrays) of elevations as
> an animation of interactively variable speed.   From what I can see I need to
> get the data into a vtkPolyData object, after which I can display it and
> manipulate its visual representation just like in the tutorials.  But
> vtkPolyVertex, vtkTriangleStrip, and vtkUnstructuredGrid are just a few of the
> candidates for an initial intra-VTK format, and it¹s not clear to me which is
> most appropriate.  Thanks very much for any help you may be able to provide.
>  
> -Steve C.
>  
> 
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list