<html><div style='background-color:'><DIV>
<P>Alex,</P>
<P>&nbsp; I think higher sample dimensions will give you better resolution, at the cost of much longer execution time. Because vtkImplitiModeller samples on a rectilinear grid there will be aliasing artefacts at any level of sample dimensions, they will just get less noticeable at higher sampling rates.</P>
<P>As far as I know implicit surfaces in vtk can only be polygonised by sampling on a grid, and then contouring an isosurface. This gets quite expensive as low detail areas must be oversampled to get acceptable resolution in high detail areas, and a lot of dead space is sampled. </P>
<DIV></DIV>
<DIV></DIV>
<P>A class that efficiently polygonises an implicit surface would be very useful in this situation. Check out the following:</P>
<P><A href="http://www.visgraf.impa.br/Projects/simple/java/">http://www.visgraf.impa.br/Projects/simple/java/</A></P>
<P>This does adaptive polygonisation, meaning more polygons are used where required. This works very well on complex shapes (the sphere is not a great example), the user can control the desired level of detail, and execution time is relatively very fast compared to a sampling approach. C source code is provided, so this could be used to develop a really useful new vtk class.... Are you feeling adventurous...?</P>
<P>&nbsp;regards</P>
<P>&nbsp;&nbsp;&nbsp; Dave Pont</P>
<P>&gt;From: Alexander Trum <A.TRUM@TERAPORT.DE></P></DIV>
<DIV></DIV>&gt;To: "vtkusers@public.kitware.com" <VTKUSERS@PUBLIC.KITWARE.COM>
<DIV></DIV>&gt;Subject: [vtkusers] Problem when creating an offset polygonal model 
<DIV></DIV>&gt;Date: Thu, 21 Mar 2002 16:47:50 +0100 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hello 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;I'm reading in a polygonal model (a rim of a car wheel) from a STL file. 
<DIV></DIV>&gt;What i want is an offset polygonal model. 
<DIV></DIV>&gt;I choose an offset of 1 millimetre. 
<DIV></DIV>&gt;The dimensions of this model are round about 250*500*500 millimetres. 
<DIV></DIV>&gt;I choose sample dimensions of 50, 100, 100 so that the modelling is done 
<DIV></DIV>&gt;with a spacing of 5 millimetres. 
<DIV></DIV>&gt;Then i create a new polygonal surface with a contour value set to the 
<DIV></DIV>&gt;offset value. 
<DIV></DIV>&gt;But the offset polygonal model has a lot of wholes where the original 
<DIV></DIV>&gt;model has a closed surface. 
<DIV></DIV>&gt;What did i wrong? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; float offset = 1.0; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; vtkSTLReader* stlReader = vtkSTLReader::New(); 
<DIV></DIV>&gt; stlReader-&gt;SetFileName("/tmp/rim.stl"); 
<DIV></DIV>&gt; stlReader-&gt;MergingOn(); 
<DIV></DIV>&gt; stlReader-&gt;Update(); 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; vtkImplicitModeller* implicitModeller = vtkImplicitModeller::New(); 
<DIV></DIV>&gt; implicitModeller-&gt;SetInput(stlReader-&gt;GetOutput()); 
<DIV></DIV>&gt; implicitModeller-&gt;SetSampleDimensions(50, 100, 100); 
<DIV></DIV>&gt; implicitModeller-&gt;Update(); 
<DIV></DIV>&gt; stlReader-&gt;Delete(); stlReader = NULL; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; vtkContourFilter* contourFilter = vtkContourFilter::New(); 
<DIV></DIV>&gt; contourFilter-&gt;SetInput(implicitModeller-&gt;GetOutput()); 
<DIV></DIV>&gt; contourFilter-&gt;SetValue(0, offset); 
<DIV></DIV>&gt; contourFilter-&gt;Update(); 
<DIV></DIV>&gt; implicitModeller-&gt;Delete(); implicitModeller = NULL; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; vtkSTLWriter* stlWriter = vtkSTLWriter::New(); 
<DIV></DIV>&gt; stlWriter-&gt;SetFileName("/tmp/offset_rim.stl"); 
<DIV></DIV>&gt; stlWriter-&gt;SetInput(contourFilter-&gt;GetOutput()); 
<DIV></DIV>&gt; stlWriter-&gt;Write(); 
<DIV></DIV>&gt; contourFilter-&gt;Delete(); contourFilter = NULL; 
<DIV></DIV>&gt; stlWriter-&gt;Delete(); stlWriter = NULL; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Thanks in advance, 
<DIV></DIV>&gt; Alex 
<DIV></DIV>&gt;&lt;&lt; a.trum.vcf &gt;&gt; 
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://g.msn.com/1HM304201/y'>http://explorer.msn.com</a>.<br></html>