POV-Ray : Newsgroups : povray.general : Blob Math Server Time
17 Oct 2026 05:59:29 EDT (-0400)
  Blob Math (Message 1 to 15 of 15)  
From: Chris Maryan
Subject: Blob Math
Date: 26 Sep 1999 17:04:17
Message: <37EE8A2E.CAB947B3@mcmaster.ca>
Does anyone (Ken?) have any good references to the mathematics of blobs?
Ideally 2D blobs explained at a fairly simple level. I have some
theories about how to program a lava lamp and blobs seem to be a good
way of accomplishing what I want.

Thanks,

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

From: Margus Ramst
Subject: Re: Blob Math
Date: 26 Sep 1999 19:22:27
Message: <37EEAA92.6CB17750@peak.edu.ee>
The manual gives a fairly complete overview of the blob object, complete with
the falloff formula. Other than that, what mathemathics are you referring to?

Margus

Chris Maryan wrote:
> 
> Does anyone (Ken?) have any good references to the mathematics of blobs?
> Ideally 2D blobs explained at a fairly simple level. I have some
> theories about how to program a lava lamp and blobs seem to be a good
> way of accomplishing what I want.
> 
> Thanks,
> 
> --
> Chris Maryan
> mailto: mar### [at] mcmasterca
> ***
> Will work for cash.
> ***
> Email me if you are interested in donating
> to the Chris Maryan needs money fund.
> We will also accept donations to the Chris
> needs a Pentium III or SGI workstation
> fund and the Chris needs a car fund.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Blob Math
Date: 26 Sep 1999 19:34:18
Message: <37eead7a@news.povray.org>
In article <37EEAA92.6CB17750@peak.edu.ee> , Margus Ramst 
<mar### [at] peakeduee>  wrote:

> The manual gives a fairly complete overview of the blob object, complete with
> the falloff formula. Other than that, what mathemathics are you referring to?

Perhaps he is looking for how exactly blobs work. It is a bit technical but
maybe this (for the source code) helps:


/***************************************************************************
*
* FUNCTION
*
*   All_Blob_Intersections
*
* INPUT
*
*   Object      - Object
*   Ray         - Ray
*
* OUTPUT
*
*   Depth_Stack - Intersection stack
*
* RETURNS
*
*   int - true, if a intersection was found
*
* AUTHOR
*
*   Alexander Enzmann
*
* DESCRIPTION
*
*   Generate intervals of influence for each component. After these
*   are made, determine their aggregate effect on the ray. As the
*   individual intervals are checked, a quartic is generated
*   that represents the density at a particular point on the ray.
*
*   Explanation for spherical components:
*
*   After making the substitutions in MakeBlob, there is a formula
*   for each component that has the form:
*
*      c0 * r^4 + c1 * r^2 + c2.
*
*   In order to determine the influence on the ray of all of the
*   individual components, we start by determining the distance
*   from any point on the ray to the specified point.  This can
*   be found using the pythagorean theorem, using C as the center
*   of this component, P as the start of the ray, and D as the
*   direction of travel of the ray:
*
*      r^2 = (t * D + P - C) . (t * D + P - C)
*
*   we insert this equation for each appearance of r^2 in the
*   components' formula, giving:
*
*      r^2 = D.D t^2 + 2 t D . (P - C) + (P - C) . (P - C)
*
*   Since the direction vector has been normalized, D.D = 1.
*   Using the substitutions:
*
*      t0 = (P - C) . (P - C),
*      t1 = D . (P - C)
*
*   We can write the formula as:
*
*      r^2 = t0 + 2 t t1 + t^2
*
*   Taking r^2 and substituting into the formula for this component
*   of the Blob we get the formula:
*
*      density = c0 * (r^2)^2 + c1 * r^2 + c2,
*
*   or:
*
*      density = c0 * (t0 + 2 t t1 + t^2)^2 +
*                c1 * (t0 + 2 t t1 + t^2) +
*                c2
*
*   Expanding terms and collecting with respect to "t" gives:
*
*      t^4 * c0 +
*      t^3 * 4 c0 t1 +
*      t^2 * (c1 + 2 * c0 t0 + 4 c0 t1^2)
*      t   * 2 (c1 t1 + 2 c0 t0 t1) +
*            c2 + c1*t0 + c0*t0^2
*
*   This formula can now be solved for "t" by any of the quartic
*   root solvers that are available.
*
* CHANGES
*
*   Jul 1994 : Added code for cylindrical and ellipsoidical blobs. [DB]
*
*   Oct 1994 : Added code to convert polynomial into a bezier curve for
*              a quick test if an intersection exists in an interval. [DB]
*
*   Sep 1995 : Added code to avoid numerical problems with distant blobs.
[DB]
*
***************************************************************************/



____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Larry Fontaine
Subject: Re: Blob Math
Date: 26 Sep 1999 21:06:08
Message: <37EEC125.44748786@isd.net>
AARGH!!!!!!!
I wanted to do a lava-lamp :-(
And here I spent all this time on a rounded-cone macro. Long equations it
has.

Chris Maryan wrote:

> Does anyone (Ken?) have any good references to the mathematics of blobs?
> Ideally 2D blobs explained at a fairly simple level. I have some
> theories about how to program a lava lamp and blobs seem to be a good
> way of accomplishing what I want.
>
> Thanks,
>
> --
> Chris Maryan
> mailto: mar### [at] mcmasterca
> ***
> Will work for cash.
> ***
> Email me if you are interested in donating
> to the Chris Maryan needs money fund.
> We will also accept donations to the Chris
> needs a Pentium III or SGI workstation
> fund and the Chris needs a car fund.


Post a reply to this message

From: Chris Maryan
Subject: Re: Blob Math
Date: 27 Sep 1999 11:10:13
Message: <37EF88B4.AC48D8C3@mcmaster.ca>
Having done some more research on blobs, I realize now that they may not
be the best thing. Specifically, I need to define a point (which is free
to move around according to lava-lamp physics). This point has an area
around it (this would have been the blob) that  is there only for
graphical purposes. The area would be spherical when the center point is
away from any other center point/area groups and would blend together
with other groups when they are close (Think blobs, defined by a center
point and having a specific radius when not influenced by other blobs).

I think the following may be a more useful solution (and it might be
more within my mathematical ability) (see diagram below):
A spline of some sort would be pulled around the 'x's (thus spherical
when uninfluenced). When the center 'X' gets close enough to another
group, the spline would be stretched around the 'x's of both groups.
Either way, I have some ideas, but would love to know if anyone else has
any thoughts, but for now, I'm off to a lecture, thanks for the help.

      x     x

         X

      x     x


Margus Ramst wrote:
> 
> The manual gives a fairly complete overview of the blob object, complete with
> the falloff formula. Other than that, what mathemathics are you referring to?
> 
> Margus
> 
> Chris Maryan wrote:
> >
> > Does anyone (Ken?) have any good references to the mathematics of blobs?
> > Ideally 2D blobs explained at a fairly simple level. I have some
> > theories about how to program a lava lamp and blobs seem to be a good
> > way of accomplishing what I want.
> >
> > Thanks,
> >
> > --
> > Chris Maryan
> > mailto: mar### [at] mcmasterca
> > ***
> > Will work for cash.
> > ***
> > Email me if you are interested in donating
> > to the Chris Maryan needs money fund.
> > We will also accept donations to the Chris
> > needs a Pentium III or SGI workstation
> > fund and the Chris needs a car fund.

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

From: Remco de Korte
Subject: Re: Blob Math
Date: 27 Sep 1999 11:19:56
Message: <37EF8B64.F91B180A@xs4all.nl>
Chris Maryan wrote:
> 
> Having done some more research on blobs, I realize now that they may not
> be the best thing. Specifically, I need to define a point (which is free
> to move around according to lava-lamp physics). This point has an area
> around it (this would have been the blob) that  is there only for
> graphical purposes. The area would be spherical when the center point is
> away from any other center point/area groups and would blend together
> with other groups when they are close (Think blobs, defined by a center
> point and having a specific radius when not influenced by other blobs).
> 
> I think the following may be a more useful solution (and it might be
> more within my mathematical ability) (see diagram below):
> A spline of some sort would be pulled around the 'x's (thus spherical
> when uninfluenced). When the center 'X' gets close enough to another
> group, the spline would be stretched around the 'x's of both groups.
> Either way, I have some ideas, but would love to know if anyone else has
> any thoughts, but for now, I'm off to a lecture, thanks for the help.
> 
>       x     x
> 
>          X
> 
>       x     x
> 

I've seen results some time ago from a demo-coding competition with a lavalamp
as subject and as far as I can remember the most convincing ones used an
algorithm similar to blob (or at least so I interpreted it - hmm...). 
I had the URL at hand but can't seem to find it right now. If you really like I
think I can dig it up. Most of the entries had the sourcecode included.

Good luck,

Remco


Post a reply to this message

From: Ron Parker
Subject: Re: Blob Math
Date: 27 Sep 1999 11:35:52
Message: <37ef8ed8@news.povray.org>
On Mon, 27 Sep 1999 11:09:40 -0400, Chris Maryan wrote:
>The area would be spherical when the center point is
>away from any other center point/area groups and would blend together
>with other groups when they are close (Think blobs, defined by a center
>point and having a specific radius when not influenced by other blobs).

This isn't true of the lava lamp in my son's room.  The blobs in his
lamp don't tend to merge due to surface tension and/or temperature effects, 
so most of them end up being either spherical or ellipsoidal after they
separate from the mass of wax at the bottom of the lamp.  They tend to
change eccentricity as they rise, due to oscillations induced by the "neck"
breaking and a large quantity of wax being pulled toward the center of 
the blob by surface tension.  There is also an area at the top of the lamp 
populated by a bunch of spheres of various sizes, packed together (and thus 
no longer spherical, but you might get away with representing them as spheres 
for POV purposes.)  Every now and then, one of those spheres cools off enough 
to sink back to the bottom but it doesn't attempt to merge with blobs on their 
way up; it seems to bounce or roll off of them.  How long it takes a sphere to 
cool and fall is probably a complex function of its radius (the ratio of volume 
to surface area is proportional to radius) and its position within the cluster 
(the temperature gradient is probably higher near the outside of the lamp, so 
heat transfer takes place more quickly.)


Post a reply to this message

From: Chris Maryan
Subject: Re: Blob Math
Date: 27 Sep 1999 18:03:06
Message: <37EFE977.7E7F6AFC@mcmaster.ca>
I studied real lava lamps a bit to get the basis for this project and
have come to the conclusion that wax that blobs together is considerably
more interesting. I think my interpretation of the physics of the motion
is fairly complete, at least to the point that it could fake what really
happens fairly well. The only thing missing is some algorithms for the
graphics/blobing.

Ron Parker wrote:
> 
> On Mon, 27 Sep 1999 11:09:40 -0400, Chris Maryan wrote:
> >The area would be spherical when the center point is
> >away from any other center point/area groups and would blend together
> >with other groups when they are close (Think blobs, defined by a center
> >point and having a specific radius when not influenced by other blobs).
> 
> This isn't true of the lava lamp in my son's room.  The blobs in his
> lamp don't tend to merge due to surface tension and/or temperature effects,
> so most of them end up being either spherical or ellipsoidal after they
> separate from the mass of wax at the bottom of the lamp.  They tend to
> change eccentricity as they rise, due to oscillations induced by the "neck"
> breaking and a large quantity of wax being pulled toward the center of
> the blob by surface tension.  There is also an area at the top of the lamp
> populated by a bunch of spheres of various sizes, packed together (and thus
> no longer spherical, but you might get away with representing them as spheres
> for POV purposes.)  Every now and then, one of those spheres cools off enough
> to sink back to the bottom but it doesn't attempt to merge with blobs on their
> way up; it seems to bounce or roll off of them.  How long it takes a sphere to
> cool and fall is probably a complex function of its radius (the ratio of volume
> to surface area is proportional to radius) and its position within the cluster
> (the temperature gradient is probably higher near the outside of the lamp, so
> heat transfer takes place more quickly.)

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

From: Chris Maryan
Subject: Re: Blob Math
Date: 27 Sep 1999 18:20:09
Message: <37EFED76.EB48DE14@mcmaster.ca>
I tried looking for this myself, but I couldn't find it. If you have
some idea of where else to look, I would appreciate it. Thanks

Remco de Korte wrote:

> I've seen results some time ago from a demo-coding competition with a lavalamp
> as subject and as far as I can remember the most convincing ones used an
> algorithm similar to blob (or at least so I interpreted it - hmm...).
> I had the URL at hand but can't seem to find it right now. If you really like I
> think I can dig it up. Most of the entries had the sourcecode included.
> 
> Good luck,
> 
> Remco

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

From: Remco de Korte
Subject: Re: Blob Math
Date: 27 Sep 1999 19:03:36
Message: <37EFF810.38C5C0D1@xs4all.nl>
Chris Maryan wrote:
> 
> I tried looking for this myself, but I couldn't find it. If you have
> some idea of where else to look, I would appreciate it. Thanks
> 
> Remco de Korte wrote:
> 
> > I've seen results some time ago from a demo-coding competition with a lavalamp
> > as subject and as far as I can remember the most convincing ones used an
> > algorithm similar to blob (or at least so I interpreted it - hmm...).
> > I had the URL at hand but can't seem to find it right now. If you really like I
> > think I can dig it up. Most of the entries had the sourcecode included.
> >
> > Good luck,
> >
> > Remco
> 
> --
> Chris Maryan
> mailto: mar### [at] mcmasterca
> ***

Well, it appears the link I had is dead. <8{

I still have some of the demos from the site but not all of them have sources
(the best not - of course...). If you like I could mail the package (<1Mb). 

I would give you some URLs but the ones I tried have appear to be all
outdated...

Sorry.

Remco


Post a reply to this message

From: Peter Popov
Subject: Re: Blob Math
Date: 27 Sep 1999 19:08:21
Message: <RPjvN5KTPamwsWKkYy0tWbTanmuG@4ax.com>
On Mon, 27 Sep 1999 18:19:34 -0400, Chris Maryan <mar### [at] mcmasterca>
wrote:

>I tried looking for this myself, but I couldn't find it. If you have
>some idea of where else to look, I would appreciate it. Thanks

I would start by looking at www.hornet.org (if it is still up, there
were rumors that it would be brought down once and for all :( ) and
www.scene.org, as well as ftp.cdrom.com, of course.


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Bob Hughes
Subject: Re: Blob Math
Date: 28 Sep 1999 02:24:39
Message: <37f05f27@news.povray.org>
When making my lava lamps I just used negative strength coupled with
positive strength blob components to fake the interactions.

Bob

Chris Maryan <mar### [at] mcmasterca> wrote in message
news:37EFE977.7E7F6AFC@mcmaster.ca...
> I studied real lava lamps a bit to get the basis for this project
and
> have come to the conclusion that wax that blobs together is
considerably
> more interesting. I think my interpretation of the physics of the
motion
> is fairly complete, at least to the point that it could fake what
really
> happens fairly well. The only thing missing is some algorithms for
the
> graphics/blobing.
>
> Ron Parker wrote:
> >
> > On Mon, 27 Sep 1999 11:09:40 -0400, Chris Maryan wrote:
> > >The area would be spherical when the center point is
> > >away from any other center point/area groups and would blend
together
> > >with other groups when they are close (Think blobs, defined by a
center
> > >point and having a specific radius when not influenced by other
blobs).
> >
> > This isn't true of the lava lamp in my son's room.  The blobs in
his
> > lamp don't tend to merge due to surface tension and/or temperature
effects,
> > so most of them end up being either spherical or ellipsoidal after
they
> > separate from the mass of wax at the bottom of the lamp.  They
tend to
> > change eccentricity as they rise, due to oscillations induced by
the "neck"
> > breaking and a large quantity of wax being pulled toward the
center of
> > the blob by surface tension.  There is also an area at the top of
the lamp
> > populated by a bunch of spheres of various sizes, packed together
(and thus
> > no longer spherical, but you might get away with representing them
as spheres
> > for POV purposes.)  Every now and then, one of those spheres cools
off enough
> > to sink back to the bottom but it doesn't attempt to merge with
blobs on their
> > way up; it seems to bounce or roll off of them.  How long it takes
a sphere to
> > cool and fall is probably a complex function of its radius (the
ratio of volume
> > to surface area is proportional to radius) and its position within
the cluster
> > (the temperature gradient is probably higher near the outside of
the lamp, so
> > heat transfer takes place more quickly.)
>
> --
> Chris Maryan
> mailto: mar### [at] mcmasterca
> ***
> Will work for cash.
> ***
> Email me if you are interested in donating
> to the Chris Maryan needs money fund.
> We will also accept donations to the Chris
> needs a Pentium III or SGI workstation
> fund and the Chris needs a car fund.


Post a reply to this message

From: Chris Maryan
Subject: Re: Blob Math
Date: 28 Sep 1999 18:01:04
Message: <37F13A7E.2055D59A@mcmaster.ca>
By allmeans, send the package. This should give me some ideas of what to
look for. Just throw it in a .zip file and send it to
mar### [at] mcmasterca
Thanks,

Remco de Korte wrote:
>
> Well, it appears the link I had is dead. <8{
> 
> I still have some of the demos from the site but not all of them have sources
> (the best not - of course...). If you like I could mail the package (<1Mb).
> 
> I would give you some URLs but the ones I tried have appear to be all
> outdated...
> 
> Sorry.
> 
> Remco

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

From: Remco de Korte
Subject: Re: Blob Math
Date: 28 Sep 1999 18:35:51
Message: <37F1430B.7D629B46@xs4all.nl>
Chris Maryan wrote:
> 
> By allmeans, send the package. This should give me some ideas of what to
> look for. Just throw it in a .zip file and send it to
> mar### [at] mcmasterca
> Thanks,
> 

It's on its way.

Have fun!

Remco


Post a reply to this message

From: Chris Maryan
Subject: Re: Blob Math
Date: 29 Sep 1999 18:24:23
Message: <37F29176.D645C1F8@mcmaster.ca>
Thanks, I got the package. Some of them are quite nice. I am now
devoting a considerable amount of time on studying the way they work
(too much time probably, considering the fact that I should be doing
homework). The visuals in these are good, but I think the physics are
neglected, something I hope to look into in my version.

Remco de Korte wrote:
> 
> Chris Maryan wrote:
> >
> > By allmeans, send the package. This should give me some ideas of what to
> > look for. Just throw it in a .zip file and send it to
> > mar### [at] mcmasterca
> > Thanks,
> >
> 
> It's on its way.
> 
> Have fun!
> 
> Remco

-- 
Chris Maryan
mailto: mar### [at] mcmasterca
***
Will work for cash.
***
Email me if you are interested in donating
to the Chris Maryan needs money fund.
We will also accept donations to the Chris
needs a Pentium III or SGI workstation 
fund and the Chris needs a car fund.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.