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