[vtkusers] Visualizing characteristic map like MATLAB surf does
Randall Hand
randall.hand at gmail.com
Sun Aug 27 09:38:34 EDT 2006
Put your data into a vtkDoubleArray & construct a vtkImageData from it.
Then pass it do a vtkWarpScalars to warp every point in the normal direction
by the amount in the array.
I do it with Terrain maps/heightmaps often.
On 8/27/06, Andy Treisch <Andy.Treisch at gmx.de> wrote:
>
> Hi All!
>
> I want to visualize a characteristik map like the Matlab "mesh" and "surf"
> commands do.
> Lets take the following map for example:
>
> 0.00 0.00 0.00 0.00
> 0.00 0.15 0.40 0.70
> 0.00 0.20 0.50 0.90
> 0.00 0.30 0.70 1.00
>
> I created a vtkPolyData adding vtkPoints with the data from the map.
> Points
> are
> (0,0,0)..(0,3,0), (1,0,0)..(1,3,0.7), ... , (3,3,1)
>
> Does there exist a filter, which can calculate the Polygons for the
> meshgrid
> without
> my Interaction? Currently I have created an additional vtkCellArray where
> I
> have
> to calculate the strips (4 Points, i.e. (0,0,0), (0,1,0), (1,0,0),
> (1,1,0.15)) Then I add them
> to a vtkPolyDataMapper via SetPoints and SetStrips Method. As I said
> before
> I would
> really like to use a vtk Filter doing the work for me.
>
> There is another reason, why I am trying to use vtk and not Matlab :)
> My application will get time-discrete data. This means, my input Data
> will change during running the application and I want to display an
> "animated"
> visualization. If I assign a new Pointset to my vtkPolyData, calculate the
> new
> Polygons and then call the Update() method on my vtkPolyDataMapper, is
> that enough to get the new display of the characteristic map? Or do I have
> to
> do something more with the vtkRenderWindow or sth. else?
>
> I have uploaded a picture of what I want to get and my current sourcefile
> to
> this location:
> http://www-public.tu-bs.de/~y0018227/vtk
>
>
> Thanks in advance for helping me,
>
> Andy Treisch
>
>
>
> _______________________________________________
> 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
>
--
----------------------------------------
Randall Hand
Visualization Scientist
ERDC MSRC-ITL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060827/7af036d9/attachment.htm>
More information about the vtkusers
mailing list