Re: Delaunay triangulator of concav geometry
Hi Geoff, I'm agree with you on the fact that this first coordinate is far from others. But in my program I triangulate points clicked by mouse and it works under MS VS 2003 and not with MS VS 2005.
The main goal of this example was just to demonstrate that under VS 2003 it works and not with MS 2005. Ideally it has to work under the both compilator. For me it's a little bug in the DelaunayTriangulator but I cannot find where.
If you have any idea of the problem let me know.
Thanks.
2006/11/30, Geoff Michel <osguser-GpyVeKolkRpeQIzoc+Smag@public.gmane.org>:
Dear Alexandre
I have tried your case, and it fails as you describe under vs8. However...... look at the first coordinate of your added constraint
float x=-10000,y=600;
bounds->push_back(osg::Vec3(x,y,getheight(x,y)));
x=1610,y=900;
all the other coordinates are near X=1600-2100. Your constraint is very (very, very, very....) long and thin, and moreover x=-10000 is way outside the terrain. I replaced the first coordinate with x=1000, and no problem the triangulation is fine.
Is the -10000 correct (in terms of your problem)? I agree that ideally the triangulator should triangulate absolutely anything, but you are probably near the limits of floating point precision for such a long thin constraint. (other cases of this error are sought).
Geoff
----- Original Message -----
Sent: Thursday, November 30, 2006 2:03 PM
Subject: Re: [osg-users] Delaunay triangulator of concav geometry
I found this morning that it's due to MS VS 2005 because I made a test modifying the example "osgDelaunay.cpp" (attached) compiling on MS VS 2003 there is no problem, but compiling with MS VS 2005 the program crashes in function
lineBisects(delauneytriangulator.cpp) because of a "out of range" in accessing array "points". It doesn't depend on OSG version (same problem with OSG 1.2 and OSG 1.1).
Please see the attached files.
Thanks.
Alexandre AMALRIC
_______________________________________________
osg-users mailing list
osg-users-O4jvQuzB+Dma2WnL5OXVi6xOck334EZe@public.gmane.org
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users-O4jvQuzB+Dma2WnL5OXVi6xOck334EZe@public.gmane.org
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
<div>
<div>Hi Geoff, I'm agree with you on the fact that this first coordinate is far from others. But in my program I triangulate points clicked by mouse and it works under MS VS 2003 and not with MS VS 2005. </div>
<div>The main goal of this example was just to demonstrate that under VS 2003 it works and not with MS 2005. Ideally it has to work under the both compilator. For me it's a little bug in the DelaunayTriangulator but I cannot find where.
</div>
<div>If you have any idea of the problem let me know.</div>
<div>Thanks.<br><br> </div>
<div>
<span class="gmail_quote">2006/11/30, Geoff Michel <<a href="mailto:osguser@...">osguser@...</a>>:</span>
<blockquote class="gmail_quote">
<div bgcolor="#ffffff">
<div>Dear Alexandre</div>
<div> </div>
<div>I have tried your case, and it fails as you describe under vs8. However...... look at the first coordinate of your added constraint</div>
<div> </div>
<div>
<p></p>float x=-10000,y=600;
<p>bounds->push_back(osg::Vec3(x,y,getheight(x,y)));</p>
<p>x=1610,y=900;</p>
<p>all the other coordinates are near X=1600-2100. Your constraint is very (very, very, very....) long and thin, and moreover x=-10000 is way outside the terrain. I replaced the first coordinate with x=1000, and no problem the triangulation is fine.
</p>
</div>
<div> </div>
<div>Is the -10000 correct (in terms of your problem)? I agree that ideally the triangulator should triangulate absolutely anything, but you are probably near the limits of floating point precision for such a long thin constraint. (other cases of this error are sought).
</div>
<span class="sg">
<div> </div>
<div>Geoff</div></span>
<blockquote>
<div><span class="e">
<div>----- Original Message ----- </div>
<div>From: <a title="alex.pixxim@..." onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:alex.pixxim@..." target="_blank">amalric alexandre
</a> </div>
<div>To: <a title="osg-users@..." onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osg-users@..." target="_blank">osg users</a> </div>
<div>Sent: Thursday, November 30, 2006 2:03 PM</div>
<div>Subject: Re: [osg-users] Delaunay triangulator of concav geometry</div>
<div>
<br> </div>
<div>I found this morning that it's due to MS VS 2005 because I made a test modifying the example "osgDelaunay.cpp" (attached) compiling on MS VS 2003 there is no problem, but compiling with MS VS 2005 the program crashes in function
lineBisects(delauneytriangulator.cpp) because of a "out of range" in accessing array "points". It doesn't depend on OSG version (same problem with OSG 1.2 and OSG 1.1).</div>
<div>Please see the attached files.</div>
<p>Thanks.</p>
<p>Alexandre AMALRIC</p>
<div>
<br><br> </div>
<div>
<span class="gmail_quote">2006/11/30, jOan <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osguser@..." target="_blank">osguser@...</a>>:</span>
<blockquote class="gmail_quote">I have the same problem using DelaunayTriangulator with MS VS2005.<br><br><br><div>
<span class="gmail_quote">2006/11/30, amalric alexandre <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:alex.pixxim@..." target="_blank">alex.pixxim@...</a>>:</span>
<blockquote class="gmail_quote">
<span>
<div>Hi,</div>
<div> </div>
<div>I want to triangulate with DelaunayTriangulator a geometry wich is concav. I give to the DelaunayTriangulator a set of point sorted and to the DelaunayConstraint the same set of point (edges of the geometry). But when i call the
triangulate() function it crashes in lineBisects() function because of a value out of range. Is it a known bug of triangulator ? or is my method not appropriated ? If it is please explain how it is possible to triangulate a concave geometry ?
</div></span><br>_______________________________________________<br>osg-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osg-users@..." target="_blank">
osg-users@...</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openscenegraph.net/mailman/listinfo/osg-users" target="_blank">http://openscenegraph.net/mailman/listinfo/osg-users
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.openscenegraph.org/" target="_blank">http://www.openscenegraph.org/</a><br><br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>jOan Abadie
<br><br>_______________________________________________<br>osg-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osg-users@..." target="_blank">osg-users@...
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openscenegraph.net/mailman/listinfo/osg-users" target="_blank">http://openscenegraph.net/mailman/listinfo/osg-users</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.openscenegraph.org/" target="_blank">
http://www.openscenegraph.org/</a><br><br>
</blockquote>
</div>
<br></span></div>
<p>
</p>
<span class="q">
<p></p>_______________________________________________<br>osg-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osg-users@..." target="_blank">osg-users@...
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openscenegraph.net/mailman/listinfo/osg-users" target="_blank">http://openscenegraph.net/mailman/listinfo/osg-users</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.openscenegraph.org/" target="_blank">
http://www.openscenegraph.org/</a></span>
<p></p>
</blockquote>
</div>
<br>_______________________________________________<br>osg-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:osg-users@...">osg-users@...
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openscenegraph.net/mailman/listinfo/osg-users" target="_blank">http://openscenegraph.net/mailman/listinfo/osg-users</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.openscenegraph.org/" target="_blank">
http://www.openscenegraph.org/</a><br><br>
</blockquote>
</div>
<br>
</div>