Thanks a million, Geoff! The new file works perfectly.
   -Paul
 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Geoff Michel
Sent: Saturday, December 16, 2006 5:50 AM
To: osg users
Cc: [EMAIL PROTECTED]
Subject: Re: [osg-users] DelaunayTriangulator issue, current CVS


Paul and Robert,
 
New delaunay triangulator attached. I hadn't realised that the erase()
method was not erase (first, last) but erase (first, one after the last one
you want deleted). This made a big difference; however some of the edges of
the terrain were not included as edges in the terrain so I increased the
size of the supertriangle, which works but reduces accuracy due to the
larger range of coordinates in the supertriangle. (A larger supertriangle
forces the triangles using supertriangle vertices to be long and thin,
making the triangulation fit the convex hull of the terrain.)
 
The loss of accuracy should not affect 'normal' users with terrains that are
roughly square (say up to 100:1 aspect ratio) and where the Z range is
comparable to the X-Y range. Retested with Pauls data, amalric's strange
polygon constraint and the standard test constraints.
 
I also added 2 tests for routines with a NULL argument passed to them
(no-one would usually pass a NULL pointer to these routines unless - as I
did in testing- you remove some of the constraints but still pass their
pointer to the routine). And I removed 3 tests for triangles which are
already removed when generating the geometry.
 
NB Paul - the previous delaunay triangulator fails under VS8 IF it has any
constraints as it attempts to use some vertices that have already been
deleted when applying the constraints to edges. Under VS6 and less rigorous
compilers it works as the deleted vertices are still in the points
stl::Vector; however any added vertices would replace one of the
supertriangle vertices with non-disastrous but wrong results.
 
Geoff

----- Original Message ----- 
From: Paul  <mailto:[EMAIL PROTECTED]> Martz 
To: 'osg users' <mailto:[email protected]>  
Sent: Thursday, December 14, 2006 10:55 PM
Subject: RE: [osg-users] DelaunayTriangulator issue, current CVS

Thanks for the post, Geoff.
 
Hm. Yep, I see where those points are deleted. But apparently, in the
preceding code, triangles are created and added to triangle lists that use
the supertriangle vertices. Many triangles are also erased from these lists,
but in my case, some erroneous triangles appear to be left on. I hope the
sample data (dtInput.osg) I posted in my recent email will be helpful.
 
Note that it is not just one extra vertex that is ending up in the resulting
triangle mesh; several vertices outside my original point domain appear to
be added. It looks like I'm ending up with 10 or 11 extra triangles that
extend outside my point domain in positive Y. Again, the dtOutput.osg in my
recent email should show the issue.
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Geoff Michel
Sent: Thursday, December 14, 2006 3:46 PM
To: osg users
Subject: Re: [osg-users] DelaunayTriangulator issue, current CVS


Paul,
 
at line 1039 these 3 vertices are removed (or at the very least 3 vertices
are removed), and so far I have not seen any triangulations which show
triangles using any supertriangle vertices being displayed. Have you got an
example that will show this extra vertex? (Ideally as simple as possible)
 
Geoff

----- Original Message ----- 
From: Paul Martz <mailto:[EMAIL PROTECTED]>  
To: 'osg users' <mailto:[email protected]>  
Sent: Thursday, December 14, 2006 10:32 PM
Subject: [osg-users] DelaunayTriangulator issue, current CVS


Geoff, Robert -- There appears to be a problem with the osgUtil
DelaunayTriangulator in current CVS.
 
At about line 774 in DelaunayTriangulator.cpp, three vertices corresponding
to a "supertriangle" are added to the points list. What I'm seeing with the
current code is that the last one of these vertices appears to be
incorrectly included in the final triangulation (the result triangle mesh
incorrectly extends outside my point domain in positive Y). If I change the
order of these vertices so that the first vertex is last, then my
triangulation incorrectly extends out in negative X. So, whichever vertex is
last seems to mistakenly end up in the triangulation.
 
This is with current CVS v1.12 of this file. If I back out to v1.11, the
problem goes away.
 
Any idea what might be going awry here?
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
303 859 9466
 

 

================================



s been verified as Virus free

Virus Protection and more available at http://

www.plus.net

============================






  _____  




_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


 

================================



s been verified as Virus free

Virus Protection and more available at http://

www.plus.net

============================






  _____  




_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to