[vtkusers] Re: Metaball Simulation

Goodwin Lawlor goodwin.lawlor at ucd.ie
Thu Jan 26 14:29:18 EST 2006


Randall Hand wrote:
> I'm curious if there is any way in VTK to do a create a MetaBall-type 
> dataset.  Example of metaballs can be found here: 
> http://www.corelmag.com/1103/overview/Metaball_Modeling.html 
> <http://www.corelmag.com/1103/overview/Metaball_Modeling.html>
> 
> Basically I want to be able to define points in 3d-space along with a 
> Radius for each, and then have a vtkPolyData (or something like it) 
> created from the results of the Metaball surface.  Is there any way to 
> do this in VTK?  I can get a rough approximation by using a vtkGlyph3d 
> and mapping a vtkSphereSource at each point, but that leaves 
> intersecting geometry without the smooth features that come from a 
> Metaballs type algorithm.

Hi Randall,

This looks a job for a vtkImplicitFunction... maybe called vtkMetaballs. 
vtkMetaballs would define a centre, a radius, and a potential function 
for each metaball you add to the system. Then, just sample it with 
vtkSampleFunction, and create the surface with a vtkContourFilter.

Have a look at this paper: http://tinyurl.com/7fdox

hth

Goodwin




More information about the vtkusers mailing list