Bryce Yoshimura
MAT 594cm - Research Project
Metaballs and Particle Physics


Metaballs:

A metaball is a seemingly squishy circular objects that have an organic look and feel to them. This squishy quality of metaballs comes from the subset of surface of which metaballs belongs to. An isosurface is a surface that is created by applying one or more functions to a space. This space is primarily referring to a 3-Dimensional one but some of the ideas can be applied in a 2-Dimensional space. An example of a function that could be applied to these space can be in the form of a circle:

    F(x,y) = (x – x0)^2 + (y-y0)^2+(z -z0)^2     (1)

where x0, y0, and z0 defines the center of the sphere. which would look like:

In this figure of the cross section of the function as the distance increases from the center of the sphere the concentric rings become lighter. A surface then can be defined by further constraining equation(1) by setting it equal to a constant number:

     F(x,y) = (x-x0)^2 + (y – y0)^2+ (z-z0)^2 = R^2     (2)

This is at last the familiar equation of a sphere that combinations of x, y and z coordinates are accepted if they satisfy equations (2). This is where the idea isosurface came from that a surface is created from the respected coordinates meeting the same required value from the function. Taking the constrained equation (2) blobby forms can take shape by applying it to N metaballs. In figure (2a) is the application of equation (2) to 6 metaballs. As R is increased the inside of the blob can be seen that the inside is not solid:


2D metaballs:

In 2-Dimensional metaballs the concentric rings seen in figure 1 can be manipulated to give interesting results. Instead of constraining equation (1) with a constant number but rearranged the equation with a constant number such as, while dropping the z-direction:

    M(x,y) = R /((x -x0)^2 + (y-y0)^2)^(1/2)    (3)

Equation(3) then can define an entire space again and not just a surface. However, if x is equal to x0 and y is equal to y0 then the equation(3) will go to infinity so there must be an upper bound that is applied independent equation(3). Also there must be a lower bound so that metaball will terminate at a reasonable distance from the center since it is approaching zero as x and y go to infinity.

This equation can be applied to N metaballs similar to the 3-Dimensional case to make blobs.


Rendering for 2-D:

The rendering process for the 2-Dimensional case is done in pixel space. An array is made to the length of the screen and the values are set to black, or any other background color. To begin rendering the metaballs the first step is to iterate through all of the pixels in the space, or on the screen, then test each pixel in equation(3) . A summation of the answers from the tested pixels is made and compared to the range specified by the boundaries. If this sum is within the boundaries then a value is added to the array at the appropriate location depending on the x and y position of the pixel, at some arbitrary color. The array is then drawn by pixel by looping through the array.


Rendering for 3-D (some ideas):

In GPU Gems 3 presents an interesting way of rendering metaballs that employs “free” particles to form the isosurface. Although the particles can have some velocity the particles must be constrained to the surface. So by doing this they create a dynamic surface while still forming the overall isosurface. GPU Gems discuss four (4) different ways to accomplish this constraints . The first of these is to make a density function of the overall so that the particles are mostly positioned at the isosurface. This function takes the form of:

              (4)

Where W a (r, h a ) is a defined weighting function. For example:

     (5)

Any weighting function that has a non-zero second derivative would suffice. The second constraint is to have the particles always have tangential velocities to the surface. And also to be constantly trying to move away from dense pockets of particles.

          (6)

in which D is proportional the negative derivative of the weighting functions. In conjecture with the tangential velocities that influence particles to move away from dense pockets they have all the particles act a repelling force against each other. This repelling force is defined a being proportional to the negative derivative of another density equation.

         (7)

in which this time the weighting function needs to decay faster than the previous.

     (8)

Finally the last constraint applied to the particles is to compare density areas are compared in which if there is a large enough difference particles will be moved from the more dense areas to the less dense.


The application:

I have decided to apply the 2-Dimensional metaball visualization to concepts inspired by Quantum Chromodynamics (QCD). This inspiration is based on the gluon forces that are found in mesons and baryons. I can only go as far to say inspired by QCD since QCD is not fully defined and rather complex.
So I had taken a suedoclassical take on it in taking a derivative of an approximate potential used in QCD.

    U= a/(r^2)-F0    (9)

This had resulted in a surprising bound state of my “Meson”, or two body particle system.


References:

David Griffiths, Introduction to Elementary Particles second, Revised Edition 2008.
Exploring Metaballs and Isosurfaces in 2D
Point-Based Visualization of Metaballs on a GPU
Wikipedia: Metaballs