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