From: Pedro T. <pt...@te...> - 2004-02-02 15:02:58
|
Hi, I've been working lately on the geometry package. I have written a DLD function named qhull that is working properly and that can be used as the engine for delaunay(n), voronoi(n) and convhull(n) functions. I have also written delaunayn.m voronoin.m and convhulln.m so that they use this new qhull function. This new functions are supposed to work like their Matlab counterparts. Now: - [ch, v] convhulln(x), returns ch triangulated (thru Q0 option, not Qt) and returns the hulls volume on v, just like Matlab. - [V, C] voronoin(x) returns the Voronoi vertices including a first vertex at infinity, and the vector array C in the same manner as Matlab (if a reference to point 1 is found this means the voronoi cell is unbounded). qhull function returns: [H, a, vol, N, O, R, V, C, inf] = qhull (p [,opt]) H : an index vector to the points of the enclosing convex hull. a : total area of hull vol: total volume of hull N : normal vector for each facet O : offsets of the hyperplanes R : a list with the neighbors to each facet. V : voronoi vertex. Only usefull if 'd' or 'v' option specifiedj. Otherwise it should return the baricentrum of each facet... C : voronoi cells. List related to V inf: Vector with ones if corresponding voronoi cell is unbounded, 0 otherwise I think this gives a better control over the geometry package than what we have right now. Also it is more Matlab compatible. I attach the corresponding files. Regards, Pedro |