[vtkusers] Please I need Help

Jonathan Bailleul Jonathan.Bailleul at greyc.ismra.fr
Fri Apr 4 08:35:28 EST 2003

mcsalas at chilesat.net wrote:
> I think, the trouble is: The polygons are iregular, they can have 4 or more
> vertex. I can Determine the numbers of polygons, but i the vertex of each
> one polygon usualy are distinct.
> I attach the txt file, the three last numbers of each file are in order:
> (X,Y) The center point of the polygon.
> L, This is another factor to compute the color of the polygon
> A, The area of the polygon.
> Best Regards
> Max
>   ------------------------------------------------------------------------
>                   Name: pozos-2.txt
>    pozos-2.txt    Type: Plain Text (text/plain)
>               Encoding: base64

This might not answer your question directly, but here is an example of
visualisation program that displays on the same window several polygons,
which are supposed to stand in separate vtk files.

Vtk file format is trivial to understand and generate (just a list of
points coordinates, and a list of polygons expressend in lists of points

# vtk DataFile Version 3.0
vtk output
POINTS 66 float
-0.0357923 0.0108192 -0.145189 0.0253222 0.058125 0.0727218 -0.0227519
-0.119053 0.0607138 
etc... each three numbers represent one point

POLYGONS 128 512
3 2 19 18 
3 19 7 20 
3 20 6 18 
... up to the 128th polygon

I presume you can build a single vtk file and arrange the list of
polygons so as to comply with instructions of file/ using my program,
all your polygons (even separate) will be rendered as a single actor.
If you want several actors, just make one file for each polygon.

I hope this gives you enough elements to solve your problems!

Jonathan BAILLEUL, Doctorant
GREYC Image - Université de Caen 

More information about the vtkusers mailing list