[vtkusers] vtkQuadricClustering problems

Fletcher Adams lifeguard1999 at netscape.net
Fri May 24 13:50:42 EDT 2002


I have a series of 55 isosurfaces representing the dust kicked up from an explosion.  The isosurfaces were created from another piece of software using the marching cubes approach.  The isosurfaces increase in size as the explosion progresses from 20K triangles to 4 million triangles.  It looks beautiful, but the problem is that 4 million triangles is not interactive.  (I get one frame every 5 seconds.)

Using vtkDecimate/vtkDecimatePro, I can only reduce the number of triangles by 50%.  Using vtkQuadricClustering gives surfaces that are manageable for small (less than 20) number of divisions in X, Y, and Z.

However, when I SetNumberOfZDivisions(20) or some number larger than 20, then I get extra points that are nowhere near the original data.  If the original data fits in cube of +/- 2000, I end up with points say at -58,000 or some weird number like that.

Following is the code fragment I am using.  My question is two-fold.  (1) Am I doing something wrong?  (2) Is there a way to clean up the decimated data of triangles with large aspect ratios.

Thanks in advance.

Paul Adams
Scientific Visualization
ERDC MSRC
Vicksburg, MS

------------------------------

#include <vtkQuadricClustering.h>
#include <vtkOBJReader.h>
#include <vtkOBJExporter.h>

main ()
{
   vtkOBJReader *OBJfile;
   vtkOBJExporter *eOBJfile;
   vtkQuadricClustering *deci;

   sprintf(s,"isosurface.obj");
   printf("%s\n",s);
   OBJfile = vtkOBJReader::New();
   OBJfile->SetFileName(s);
   OBJfile->Update();

   deci = vtkQuadricClustering::New();
   deci->SetInput(OBJfile->GetOutput());
   deci->SetNumberOfXDivisions(50);
   deci->SetNumberOfYDivisions(50);
   deci->SetNumberOfZDivisions(20);    



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




More information about the vtkusers mailing list