[vtkusers] Bug or Design: Rendering concave polygons with vtkActor2D
David E DeMarle
dave.demarle at kitware.com
Wed May 5 07:51:40 EDT 2010
I suspect that is because OpenGL doesn't render concave polygons
properly, thus VTK, which uses GL to render, doesn't either. So
unfortunately you have to tesselate that into a set convex polygons in
order to have it drawn properly.
David E DeMarle
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
On Tue, May 4, 2010 at 11:38 AM, Xiaofeng Z <xf10036 at hotmail.com> wrote:
> Concave polygons are not rendered as expected with vtkPolyDataMapper and
> vtkActor2D (see below). Is it by design or is it a bug? If it's by design,
> is there any flag can be set to alter the rendering behaviour?
> Hi all,
> How do I make uniform transparency in a concave polygon, instead of getting
> multiple shades, e.g. in the attached graph?
> The polygon are created with:
> vtkPoints* points = vtkPoints::New();
> vtkCellArray* cells = vtkCellArray::New();
> // create a concave polygon (equilateral with a cutout at the bottom)
> points->SetPoint(0, 10.0, 10.0, 0.0);
> points->SetPoint(1, 110.0, 183.2, 0.0);
> points->SetPoint(2, 210.0, 10.0, 0.0);
> points->SetPoint(3, 110.0, 110.0, 0.0);
> cells->Allocate(1, 5);
> vtkPolyData* poly = vtkPolyData::New();
> A vtkActor2D and a vtkPolyDataMapper2D was used for the rendering.
> Many thanks!
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail. Get busy.
> Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
> Learn more.
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Follow this link to subscribe/unsubscribe:
More information about the vtkusers