POV-Ray : Newsgroups : povray.advanced-users : Parametric metaball? Server Time
31 Oct 2024 21:27:55 EDT (-0400)
  Parametric metaball? (Message 1 to 9 of 9)  
From: posfan12
Subject: Parametric metaball?
Date: 22 Aug 2013 14:05:00
Message: <web.52165299b510e27941a177270@news.povray.org>
Are there parametric equivalents to the implicit metaball functions found here:

http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm

I would like to plot random points withing the curves/surfaces.


Thanks!


Post a reply to this message

From: Alain
Subject: Re: Parametric metaball?
Date: 22 Aug 2013 17:54:07
Message: <5216887f$1@news.povray.org>

> Are there parametric equivalents to the implicit metaball functions found here:
>
>
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm
>
> I would like to plot random points withing the curves/surfaces.
>
>
> Thanks!
>
>
>
>

Take a look at the blob primitive. The sole difference is that the 
strength of the fields decrease in a linear fashion.


Post a reply to this message

From: posfan12
Subject: Re: Parametric metaball?
Date: 22 Aug 2013 18:50:01
Message: <web.5216950f243bb66641a177270@news.povray.org>
Thanks. How does that help me determine point coordinates?


Mike

Alain <kua### [at] videotronca> wrote:

> > Are there parametric equivalents to the implicit metaball functions found here:
> >
> >
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm
> >
> > I would like to plot random points withing the curves/surfaces.
> >
> >
> > Thanks!
> >
> >
> >
> >
>
> Take a look at the blob primitive. The sole difference is that the
> strength of the fields decrease in a linear fashion.


Post a reply to this message

From: clipka
Subject: Re: Parametric metaball?
Date: 22 Aug 2013 21:21:00
Message: <5216b8fc@news.povray.org>
Am 22.08.2013 20:04, schrieb posfan12:
> Are there parametric equivalents to the implicit metaball functions found here:
>
>
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm

For the special case of two elements, there most certainly /are/ 
parametric representations; for instance, assuming the elements are both 
centered on the X axis, the following mapping will obviously work for 
all cases where the surface in question is contiguous and the shape has 
a circular y/z cross-section for every x:

   u = x
   sin(v) / cos(v) = y / z

(As a matter of fact it will work for plenty cases with non-circular 
cross-sections as well.)

Solving for (x,y,z) for a given field strength may be non-trivial though.


Post a reply to this message

From: scott
Subject: Re: Parametric metaball?
Date: 23 Aug 2013 03:33:08
Message: <52171034$1@news.povray.org>
> Are there parametric equivalents to the implicit metaball functions found here:
>
>
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm
>
> I would like to plot random points withing the curves/surfaces.

You could use the original equations in an isosurface object and then 
use trace to find points on the surface. Would that do what you want?


Post a reply to this message

From: Alain
Subject: Re: Parametric metaball?
Date: 23 Aug 2013 16:46:06
Message: <5217ca0e$1@news.povray.org>

> Thanks. How does that help me determine point coordinates?
>
>
> Mike
>
> Alain <kua### [at] videotronca> wrote:

>>> Are there parametric equivalents to the implicit metaball functions found here:
>>>
>>>
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm
>>>
>>> I would like to plot random points withing the curves/surfaces.
>>>
>>>
>>> Thanks!
>>>
>>>
>>>
>>>
>>
>> Take a look at the blob primitive. The sole difference is that the
>> strength of the fields decrease in a linear fashion.
>
>
>
>
Once the object is defined, you can use the trace function to shoot rays 
at it from random locations. Be sure to use the trace with the normal 
option. If the returned normal vector, that trace totaly missed your 
object. For any non-null normal vector, you have a valid point on the 
surface.

You also use an isosurface object. It allow you to use any function you 
want. For the metaball using values diminishing relative to the 
distance, you'll need to use the reciprocal (1/function) to get useable 
result. An isosurface assume that values smaller that the thressold are 
inside the object.


Alain


Post a reply to this message

From: posfan12
Subject: Re: Parametric metaball?
Date: 24 Aug 2013 16:30:02
Message: <web.521917b1243bb66641a177270@news.povray.org>
The problem is actually not a POVray one. I should have started a thread in off
topic instead.

So I can't make use of the isosurface object or the trace function.

What I ended up doing was placing random points in the blob's bounding box and
then testing whether they were inside the blob or not. A parametric equation
would result in no misses, and might have other desirable properties too such as
creating more points where the blob is densest or where the curvature is
greatest.



Mike


Alain <kua### [at] videotronca> wrote:

> > Thanks. How does that help me determine point coordinates?
> >
> >
> > Mike
> >
> > Alain <kua### [at] videotronca> wrote:

> >>> Are there parametric equivalents to the implicit metaball functions found here:
> >>>
> >>>
http://www.geogebra.org/en/upload/files/english/Michael_Horvath/Metaballs/geogebra_metaballs.htm
> >>>
> >>> I would like to plot random points withing the curves/surfaces.
> >>>
> >>>
> >>> Thanks!
> >>>
> >>>
> >>>
> >>>
> >>
> >> Take a look at the blob primitive. The sole difference is that the
> >> strength of the fields decrease in a linear fashion.
> >
> >
> >
> >
> Once the object is defined, you can use the trace function to shoot rays
> at it from random locations. Be sure to use the trace with the normal
> option. If the returned normal vector, that trace totaly missed your
> object. For any non-null normal vector, you have a valid point on the
> surface.
>
> You also use an isosurface object. It allow you to use any function you
> want. For the metaball using values diminishing relative to the
> distance, you'll need to use the reciprocal (1/function) to get useable
> result. An isosurface assume that values smaller that the thressold are
> inside the object.
>
>
> Alain


Post a reply to this message

From: posfan12
Subject: Re: Parametric metaball?
Date: 24 Aug 2013 20:40:03
Message: <web.52195193243bb66641a177270@news.povray.org>
A related question:

I am looking at renders of implicit functions created in other software, such as
here:

http://xahlee.info/surface/cayley_cubic/cayley_cubic.html

How does the software make the nice wireframes gridlines. Is this easy to do?


Mike


Post a reply to this message

From: Alain
Subject: Re: Parametric metaball?
Date: 25 Aug 2013 16:57:02
Message: <521a6f9e$1@news.povray.org>

> A related question:
>
> I am looking at renders of implicit functions created in other software, such as
> here:
>
> http://xahlee.info/surface/cayley_cubic/cayley_cubic.html
>
> How does the software make the nice wireframes gridlines. Is this easy to do?
>
>
> Mike
>
>
>

POV-Ray can't make a wireframe because, internaly, it's objects are 
never converted into a mesh as most other applications do.


Alain


Post a reply to this message

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