[vtkusers] filled polygons

Kevin Wright krw at viz-solutions.com
Wed Oct 17 18:44:42 EDT 2001


Yi-Kun Yang wrote:

> Hi,
>
> Is it possible to draw filled polygons using VTK.  Instead of contour
> lines, I wish to fill each polygons (squares, triangles...) in my
> simulation with a color which represents the calculated value of that
> particular polygon.

Create  a vtkScalars object with your scalar values, apply the scalar to the polydata with
SetCellData, then on your mapper make the SetScalarModeToUseCellData call.

Kevin.





More information about the vtkusers mailing list