<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.emailstyle17
        {font-family:Arial;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:maroon;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>ParaView is
doing the Delaunay triangulation correct. The problem is that the
Delaunay triangulation is not what you are looking for. The Delaunay
triangulation looks only at a collection of points (so that your line border is
thrown away) and provides a triangulation with many interesting properties, on
of which is that it is the convex hull of the points. Since your original
polygon is not convex, the Delaunay triangulation of its points will not cover
the same area.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>Part of your
problem is that you are trying to represent a polygon as a line. ParaView/VTK
will not recognize this as a 2D polygon with area and thus will not try to triangulate
it as such. Instead, load the polygon as an actual polygon. In your
data file, change LINES on line 23 to POLYGONS. (You can also remove the
last point in the polygon if you want. It is redundant as the polygon
will automatically be closed.) Now load that into ParaView. You
will notice that it is not rendered correctly. That is simply because the
rendering algorithms assume that it is rendering convex polygons. Don’t
worry; the underlying representation is still correct.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>Now that
ParaView/VTK correctly understands that this is a polygon, you can run the “Triangulate”
filter on it. That gives you a correct (although not optimal)
triangulation.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>-Ken<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
paraview-bounces+kmorel=sandia.gov@paraview.org
[mailto:paraview-bounces+kmorel=sandia.gov@paraview.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Bob Anderson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, October 02, 2007
9:50 AM<br>
<b><span style='font-weight:bold'>To:</span></b> paraview@paraview.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Paraview] Bad
triangulation for Polygon</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>For polygons with lobes, the tests I’ve done with
ParaView don’t give correct surface triangulation.</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>In the case where the object comes from my custom reader,
using output->SetPolys(myCellsPtr); it produces a surface that doesn’t
stay within the polygon boundary, and applying the Delaunay2D filter to the
polyline object (SamplePolygon1Cell.vtk) also ‘blobbs’ the polygon.</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>See attachments –a correct surface triangulation (SamplePolySurface.jpg),
and the ParaView result (PV_Delaunay2D_Polygon.jpg)</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I’m currently doing my own triangulation using
‘hgrd_src’ routines from CodeProject, but if there is a better way
to get the correct results within ParaView I’d be happy to try it.</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Bob Anderson</span></font><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>MIRARCO Mining Innovation</span></font><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>Laurentian University</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>