From: Pedro T. <pt...@te...> - 2003-12-17 13:53:08
|
Rafael, > I just cvs committed the changes for the convhull and convhulln functions. > They accept now an extra (string) argument containing extra options to be > passed to the underlying qhull command. Sorry for the delay but I've been away a few days. Let me point a few thing= s=20 about the new convhulln: - It accepts a string but it is added to the default "s Qt Tcv".I=20 would rather use these options only in the case in which a string hasn't be= en=20 parsed, so that I can use QJ. I don't know the reason but Qt is not returni= ng=20 the same output from octave than outside octave (if you test qhull with a 3= D=20 cube you will get 12 triangulated facets from qhull and 6 facets and extra= =20 vertices from within octave). - Output. The only output the command gives right now is limited an= d=20 biased: - Biased: Since the output matrix is limited to dimension=20 "dim", extra=20 vertices for non simplicial facets get discarded. My knowledge of C is very= =20 little, but.. =BFis it possible to increase the dimension of the returning= =20 matrix (maybe filling it with zeros) in the case of finding a non-simplicia= l=20 facet?. It would be something in line 97 like that: if (j > dim) { dim =3D dim + 1 redim idx(n, dim) for k =3D 1 to i-1{ idx (k, dim) =3D 0 } idx(i,j++) =3D 1 + qh_pointid(vertex->point) } (As you can see my knowledge of C is scarce and I've=20 reinvented the syntax=20 ;) ). - Limited: Parsing a string to qhull allows to obtain some= =20 other info on the hull. Some info that is specially interesting for me is t= he=20 normals to each facet (option n). Since qhull can return various output set= s=20 =BFis it possible that it returns an octave struct with the different resul= ts?.=20 (I have tried to parse to qhull the "TO file" string so that I could get th= e=20 normals from the file created but it does not work. This could also be a=20 solution, in fact THE solution in the case of OFF output to feed Geomview). Regards, Pedro =20 > > I did some minimal tests, but additional checks are welcomed. The next > step will be changing the voronoi* functions. |