Re: DelaunayTriangulation[] output

*To*: mathgroup at smc.vnet.net*Subject*: [mg83218] Re: DelaunayTriangulation[] output*From*: Frank Iannarilli <frankeye at cox.net>*Date*: Thu, 15 Nov 2007 05:39:04 -0500 (EST)*References*: <fhegn1$m6p$1@smc.vnet.net>

On Nov 14, 4:55 am, Dominick <pd20012... at yahoo.com> wrote: Hi Dominick, I used the following functions and command sequence (they worked in Mathematica 5.2, I presume they'll still work in 6). In below, "facet"=triangle. deltri=DelaunayTriangulation[.....]; The following function works (for all but the 1st vertex, which yields bogus facet {1, deltri[[1,2,-1]], 2}) makeFacets[record_List]:=Module[{return={},base=record[[1]],list=record[[2]]}, For[i=1,i<=Length[list],i++,If[(list[[1]]> base &&list[[2]]> base), return=Append[return,{base,list[[1]],list[[2]]}]];list=RotateLeft[list, 1] ]; return] A quick test of makeFacets[]: In: makeFacets[{20,{43,19,1,21,44}}] Out: {{20,21,44},{20,44,43}} facets=Partition[Flatten[Map[(makeFacets[#])&,deltri]],3]; facets=DeleteCases[facets,{1,deltri[[1,2,-1]],2}]; "facets" will be a list of triangles (each a list of 3 vertex indices) Good luck