[vtkusers] file format: Polygonal Data - POINTS, POLYGONS - wireframe, surface visualization

Sean McInerney seanm at nmr.mgh.harvard.edu
Mon Aug 2 16:20:21 EDT 2004


Hi Chris,

   The polygon that you have created is non-convex. Neither OpenGL nor 
most other rendering systems will abide this. This will work:

POLYGONS 3 19
5  0 1 2 10 11
6  2 3 4 8 9 10
5  4 5 6 7 8

-Sean

Chris Kennedy wrote:
> hi,
> I'm creating VTK format files and I have trouble when I visualize the 
> data. In wireframe it looks ok, but in Surface mode I have triangles 
> showing up that I don't understand.  I get the same behavior independent 
> of whether I close the polygon or not.
> 
> # vtk DataFile Version 2.0
> polydata for mask m3
> ASCII
> DATASET POLYDATA
> POINTS 12 float
> 25.0 0.0 3.0
> 25.0 8.0 3.0
> 15.5 8.0 3.0
> 15.5 11.0 3.0
> 12.5 11.0 3.0
> 12.5 19.0 3.0
> 0.5 19.0 3.0
> 0.5 9.0 3.0
> 10.5 9.0 3.0
> 10.5 6.5 3.0
> 14.0 6.5 3.0
> 14.0 0.0 3.0
> 
> POLYGONS 1 14
> 13   0 1 2 3 4 5 6 7 8 9 10 11 0
> 
> # =====================
> 
> Do I need to define additional data for the POLYDATA type to get this to 
> show up properly? or is subsequent processing thru a filter required?
> 
> thanks
> 
> Chris Kennedy
> Think Peak, Inc.
> 



More information about the vtkusers mailing list