Metaball Simulation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Metaball Simulation

Randall Hand
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

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.

--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Metaball Simulation

Goodwin Lawlor
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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Re: Metaball Simulation

Randall Hand
Clever.. so you mean I would derive a vtkMetaballs from vtkImplicitFunction that basically had 1 user function "AddMetaball(float position[3], float radius)".  Then all i'll need is to override the EvaluateFunction and EvaluateGradient to return the correct value, right?

wow.. That's nowhere near as complicated as I was expecting to have to do :)  Thanks!

On 1/26/06, Goodwin Lawlor <[hidden email]> wrote:
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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

RE: Re: CMake issues

srfpala
Greetings.
Running Win XP Home with VC++.Net Express 2005.  In attempting to build vtk 4.2 CMake 2.2-Patch3  reports that it cannot compile a sample program and offers no output message.   I tested my own C program using cl from within a batch file and the comile. link, execute sequence was successful.
What should I do?
BR
  Bob Palank
-----Original Message-----
From: vtkusers-bounces+bob=[hidden email] [mailto:vtkusers-bounces+bob=[hidden email]]On Behalf Of Randall Hand
Sent: Thursday, January 26, 2006 1:56 PM
To: Goodwin Lawlor
Cc: [hidden email]
Subject: Re: [vtkusers] Re: Metaball Simulation

Clever.. so you mean I would derive a vtkMetaballs from vtkImplicitFunction that basically had 1 user function "AddMetaball(float position[3], float radius)".  Then all i'll need is to override the EvaluateFunction and EvaluateGradient to return the correct value, right?

wow.. That's nowhere near as complicated as I was expecting to have to do :)  Thanks!

On 1/26/06, Goodwin Lawlor <[hidden email]> wrote:
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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Re: CMake issues

Tom Radcliffe

Do you have the platform SDK installed?  It can be downloaded from the
Microsoft website--it is not part of the VC++.Net Express 2005 install.

--Tom

--
Tom Radcliffe, Ph.D., P.Eng.
President, Predictive Patterns Software Inc.
http://www.predictivepatterns.com | 613-483-9803
[hidden email]


Bob Palank wrote:

> Greetings.
> Running Win XP Home with VC++.Net Express 2005.  In attempting to
> build vtk 4.2 CMake 2.2-Patch3  reports that it cannot compile a
> sample program and offers no output message.   I tested my own C
> program using cl from within a batch file and the comile. link,
> execute sequence was successful.
> What should I do?
> BR
>   Bob Palank
>
>     -----Original Message-----
>     *From:* vtkusers-bounces+bob=[hidden email]
>     [mailto:vtkusers-bounces+bob=[hidden email]]*On Behalf Of
>     *Randall Hand
>     *Sent:* Thursday, January 26, 2006 1:56 PM
>     *To:* Goodwin Lawlor
>     *Cc:* [hidden email]
>     *Subject:* Re: [vtkusers] Re: Metaball Simulation
>
>     Clever.. so you mean I would derive a vtkMetaballs from
>     vtkImplicitFunction that basically had 1 user function
>     "AddMetaball(float position[3], float radius)".  Then all i'll
>     need is to override the EvaluateFunction and EvaluateGradient to
>     return the correct value, right?
>
>     wow.. That's nowhere near as complicated as I was expecting to
>     have to do :)  Thanks!
>
>     On 1/26/06, *Goodwin Lawlor* < [hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         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
>         <http://tinyurl.com/7fdox>
>
>         hth
>
>         Goodwin
>
>         _______________________________________________
>         This is the private VTK discussion list.
>         Please keep messages on-topic. Check the FAQ at:
>         http://www.vtk.org/Wiki/VTK_FAQ
>         Follow this link to subscribe/unsubscribe:
>         http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>
>     --
>     Randall Hand
>     Visualization Scientist,
>     ERDC-MSRC Vicksburg, MS
>     Homepage: http://www.yeraze.com 
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>  
>


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Re: Metaball Simulation

Goodwin Lawlor
In reply to this post by Randall Hand
Hi Randall,
 
Yeah - exactly. I'd have to look at it closer but an alternative would be a vtkMetaball subclass that just defines one function, then use vtkImplicitBoolean to sum up the functions- I'm not sure this would work... the potential functions maybe coupled,if so- it wont.
 
Goodwin
----- Original Message -----
Sent: Thursday, January 26, 2006 7:55 PM
Subject: Re: [vtkusers] Re: Metaball Simulation

Clever.. so you mean I would derive a vtkMetaballs from vtkImplicitFunction that basically had 1 user function "AddMetaball(float position[3], float radius)".  Then all i'll need is to override the EvaluateFunction and EvaluateGradient to return the correct value, right?

wow.. That's nowhere near as complicated as I was expecting to have to do :)  Thanks!

On 1/26/06, Goodwin Lawlor <[hidden email]> wrote:
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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers