<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks for the suggest. I'll try vtkTriangleFilter and report the result.<br><br>Xiaofeng<br><br><br><br>> From: david.gobbi@gmail.com<br>> Date: Thu, 6 May 2010 09:20:40 -0600<br>> Subject: Re: [vtkusers] Bug or Design: Rendering concave polygons with         vtkActor2D<br>> To: xf10036@hotmail.com<br>> CC: dave.demarle@kitware.com; vtkusers@vtk.org<br>> <br>> Why not use vtkTriangleFilter? It can tesselate concave polygons.<br>> <br>> David<br>> <br>> <br>> On Thu, May 6, 2010 at 9:06 AM, Xiaofeng Z <xf10036@hotmail.com> wrote:<br>> > David,<br>> ><br>> > I am thinking of using GLU to perform Tessellation. I wonder how involved<br>> > it would be if I try to do it inside VTK.<br>> ><br>> > I would appreciate it if you can provide some insight.<br>> ><br>> > Thanks!<br>> ><br>> > Xiaofeng<br>> ><br>> ><br>> ><br>> ><br>> >> From: dave.demarle@kitware.com<br>> >> Date: Wed, 5 May 2010 07:51:40 -0400<br>> >> Subject: Re: [vtkusers] Bug or Design: Rendering concave polygons with<br>> >> vtkActor2D<br>> >> To: xf10036@hotmail.com<br>> >> CC: vtkusers@vtk.org<br>> >><br>> >> I suspect that is because OpenGL doesn't render concave polygons<br>> >> properly, thus VTK, which uses GL to render, doesn't either. So<br>> >> unfortunately you have to tesselate that into a set convex polygons in<br>> >> order to have it drawn properly.<br>> >><br>> >> David E DeMarle<br>> >> Kitware, Inc.<br>> >> R&D Engineer<br>> >> 28 Corporate Drive<br>> >> Clifton Park, NY 12065-8662<br>> >> Phone: 518-371-3971 x109<br>> >><br>> >><br>> >><br>> >> On Tue, May 4, 2010 at 11:38 AM, Xiaofeng Z <xf10036@hotmail.com> wrote:<br>> >> > Concave polygons are not rendered as expected with vtkPolyDataMapper and<br>> >> > vtkActor2D (see below). Is it by design or is it a bug? If it's by<br>> >> > design,<br>> >> > is there any flag can be set to alter the rendering behaviour?<br>> >> ><br>> >> > Thanks!<br>> >> ><br>> >> > Xiaofeng<br>> >> ><br>> >> > Hi all,<br>> >> ><br>> >> > How do I make uniform transparency in a concave polygon, instead of<br>> >> > getting<br>> >> > multiple shades, e.g. in the attached graph?<br>> >> ><br>> >> > The polygon are created with:<br>> >> ><br>> >> > vtkPoints* points = vtkPoints::New();<br>> >> > vtkCellArray* cells = vtkCellArray::New();<br>> >> > points->SetNumberOfPoints(4);<br>> >> ><br>> >> > // create a concave polygon (equilateral with a cutout at the bottom)<br>> >> ><br>> >> > points->SetPoint(0, 10.0, 10.0, 0.0);<br>> >> > points->SetPoint(1, 110.0, 183.2, 0.0);<br>> >> > points->SetPoint(2, 210.0, 10.0, 0.0);<br>> >> > points->SetPoint(3, 110.0, 110.0, 0.0);<br>> >> > cells->Allocate(1, 5);<br>> >> > cells->InsertNextCell(5);<br>> >> > cells->InsertCellPoint(0);<br>> >> > cells->InsertCellPoint(1);<br>> >> > cells->InsertCellPoint(2);<br>> >> > cells->InsertCellPoint(3);<br>> >> > cells->InsertCellPoint(0);<br>> >> > vtkPolyData* poly = vtkPolyData::New();<br>> >> > poly->Initialize();<br>> >> > poly->SetGlobalWarningDisplay(1);<br>> >> > poly->SetPoints(points);<br>> >> > poly->SetPolys(cells);<br>> >> ><br>> >> > A vtkActor2D and a vtkPolyDataMapper2D was used for the rendering.<br>> >> ><br>> >> > Many thanks!<br>> >> > Xiaofeng<br>> >> ><br>> >> ><br>> >> ><br>> >> > ________________________________<br>> >> > The New Busy think 9 to 5 is a cute idea. Combine multiple calendars<br>> >> > with<br>> >> > Hotmail. Get busy.<br>> >> > ________________________________<br>> >> > Hotmail has tools for the New Busy. Search, chat and e-mail from your<br>> >> > inbox.<br>> >> > Learn more.<br>> >> > _______________________________________________<br>> >> > Powered by www.kitware.com<br>> >> ><br>> >> > Visit other Kitware open-source projects at<br>> >> > http://www.kitware.com/opensource/opensource.html<br>> >> ><br>> >> > Please keep messages on-topic and check the VTK FAQ at:<br>> >> > http://www.vtk.org/Wiki/VTK_FAQ<br>> >> ><br>> >> > Follow this link to subscribe/unsubscribe:<br>> >> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> >> ><br>> >> ><br>> ><br>> > ________________________________<br>> > The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with<br>> > Hotmail. Get busy.<br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the VTK FAQ at:<br>> > http://www.vtk.org/Wiki/VTK_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> ><br>> ><br>                                            <br /><hr />Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1' target='_new'>Learn more.</a></body>
</html>