From: Rafael L. <rla...@us...> - 2003-12-18 00:04:23
|
* Pedro Tarrafeta <pt...@te...> [2003-12-17 14:52]: > - Output. The only output the command gives right now is limited and > biased: > > - Biased: Since the output matrix is limited to dimension "dim", extra > vertices for non simplicial facets get discarded. My knowledge of C is > very little, but.. ¿is it possible to increase the dimension of the > returning matrix (maybe filling it with zeros) in the case of finding a > non-simplicial facet?. It would be something in line 97 like that: > > if (j > dim) { > dim = dim + 1 > redim idx(n, dim) > for k = 1 to i-1 { > idx (k, dim) = 0 > } > idx(i,j++) = 1 + qh_pointid(vertex->point) > } Instead of doing that, we might return a cell array instead of a matrix when non simplicial facets are found. For instance, the following result: $ cat cube 3 7 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 $ cat cube | qhull o 3 7 7 12 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 4 2 3 1 0 3 6 3 2 4 4 6 2 0 3 3 5 1 3 5 6 4 3 6 5 3 4 5 4 0 1 would be represented in Octave like this: A = {[3 4 2 1], [7 4 3], [5 7 3 1], [4 6 2], [6 7 5], [7 6 4], [6 5 1 2]} (Notice that vertex indices in Octave start at 1 instead of zero.) I do not know how backward incompatible would be such a change. > - Limited: Parsing a string to qhull allows to obtain some other info on > the hull. Some info that is specially interesting for me is the normals > to each facet (option n). Since qhull can return various output sets is > it possible that it returns an octave struct with the different results?. > (I have tried to parse to qhull the "TO file" string so that I could get > the normals from the file created but it does not work. This could also > be a solution, in fact THE solution in the case of OFF output to feed > Geomview). To avoid backward incompatible changes, what about having extra output arguments, one for the facet normals, other for the OFF string result, and so on? -- Rafael |