[vtkusers] best way to represent a (planar) irregular polygon ?
brian
briand at aracnet.com
Thu May 29 23:57:12 EDT 2008
Hi all,
I'm trying to represent a polygon which is cartesian-grid based (all
of the points lie in the same plane), i.e. the entire polygon can be
separated into rectangles. Using paraview I tried the most obvious
representation, i.e. simply set up the boundary points, connected
them all and then formed a single cell.
Paraview didn't seem to like that very much, it attempted to draw
lines between unconnected points when shading was turned on (although
wireframe looked OK). It doesn't seem to like "inside" corners -
does that make sense ? Are there any gotchas in trying to represent a
polygon in this manner ?
Assuming that I do need to represent my structure differently, I
could "scan convert" the polygon into it' component rectangles, but
there are couple of choices (using an XML file representation):
Simply create the polygon as PolyData with each piece composed of
a rectangle.
Use an unstructured grid with each piece represented by a
vtk_pikel cell.
Does either method have a particular advantage ?
Is there a better way ?
Which of the VTK books, the user guide or the textbook would be
better at answering this sort of question ?
Obviously all the questions mark me as a VTK beginner, all help
appreciated.
Thanks
Brian
More information about the vtkusers
mailing list