|
From: Ethan M. <merritt@u.washington.edu> - 2010-12-12 19:10:35
|
On Sunday, December 12, 2010, Hans-Bernhard Bröker wrote: > On 12.12.2010 16:51, Alexandre Felipe wrote: > > > Find all the triangle pairs for wich the nearest vertex of firstis > > nearer than the farthest of the vertexes of the second triangle, and the > > farthest vertex of first is farther than the nearest of the vertexes of > > the second triangle. > [...] > > You've pretty much re-invented the Newell-Newell-Sancha algorithm that > I've mentioned before, except that their textbook algorithm doesn't > split the job into two passes (first splitting, second sorting) like you > did. That avoids a good deal of unnecessary splitting. Is it possible that instead of modifying the pm3d code, one could modify the hidden-surface removal code in hidden3d? The hidden3d code is already finding all the relevant lines of intersection and occlusion. At the end of the hidden3d calculation there is a collection of edges, each of which is either all or part of an edge from the original set of polygons or an intersection of two polygons. At that point the code walks through the list and draws all the edges. Does it track enough information to also call term->filled_polygon() for each facet? If not, could the data structures be expanded to hold that tracking information? |