 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Greg M Johnson
Subject: Turning squares into a smooth isosurface
Date: 8 Apr 2003 09:41:47
Message: <3e92d19b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Suppose you have a bitmap which comprises white rectangles on a black
backround. In a paint editor, one may do a blur operation and then use the
resulting bitmap in povray as a heightfield.
I'm looking for a more sophisticated and automatic analogue to this
approach, perhaps starting with prisms, DXF files, boxes, or the like.
What operations like this are available as an isosurface??
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Greg M. Johnson <gregj:-)565### [at] aol com> wrote:
> I'm looking for a more sophisticated and automatic analogue to this
> approach, perhaps starting with prisms, DXF files, boxes, or the like.
> What operations like this are available as an isosurface??
One idea comes to my mind:
You probably know the HF_Square() macro and how you can create a mesh
(which looks like a heightfield) with it using an image (ie. you make
a pigment function with the image and then a function which takes the .gray
value of this pigment function and give it to HF_Square()).
My idea: Instead of making a function which takes the .gray value of
the pigment function, make this function to take several .gray values
from the pigment function and average them together (perhaps with a weight
value if you want).
That is, when you normally would do this:
#declare ImageGray = function { Image(x,y,z).gray }
you would do for example this:
#declare ImageGray =
function
{ .16 * Image(x,y,z).gray +
.13 * Image(x+Offsx,y,z).gray +
.13 * Image(x-Offsx,y,z).gray +
.13 * Image(x,y+Offsy,z).gray +
.13 * Image(x,y-Offsy,z).gray +
.08 * Image(x+Offsx,y+Offsy,z).gray +
.08 * Image(x-Offsx,y+Offsy,z).gray +
.08 * Image(x+Offsx,y-Offsy,z).gray +
.08 * Image(x-Offsx,y-Offsy,z).gray
}
Then you give ImageGray to HF_Square() to generate the mesh.
Note that the sum of all the factors should always be 1.
The 'Offsx' and 'Offsy' values above are offset values which depend on the
resolution of the image. They could get the adjacent pixel of the image, but
they can perfectly go further, which probably smoothens the image more.
And of course you can add even more "samples" to the function in order
to get a smoother result from a larger area (eg using "Offsx*2" etc).
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 8 Apr 2003 10:07:32 -0400, Warp <war### [at] tag povray org> wrote:
> My idea: Instead of making a function which takes the .gray value of
> the pigment function, make this function to take several .gray values
> from the pigment function and average them together (perhaps with a weight
> value if you want).
tests of my proxity/blur pattern: http://news.povray.org/search/?s=proximity
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <e4m59voqjep5o5h06ojj5qabte823uoduv@4ax.com>,
ABX <abx### [at] abx art pl> wrote:
> tests of my proxity/blur pattern: http://news.povray.org/search/?s=proximity
I kind of wish you would stop calling it that, it has little to do with
proximity and only resembles the proximity pattern. Just "blur" is more
precise.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 08 Apr 2003 11:41:14 -0400, Christopher James Huff
<cja### [at] earthlink net> wrote:
> In article <e4m59voqjep5o5h06ojj5qabte823uoduv@4ax.com>,
> ABX <abx### [at] abx art pl> wrote:
>
> > tests of my proxity/blur pattern: http://news.povray.org/search/?s=proximity
>
> I kind of wish you would stop calling it that, it has little to do with
> proximity and only resembles the proximity pattern. Just "blur" is more
> precise.
Sadly I'm not language expert but I looked into my dictionary and I think used
algorithm fits in both. Sorry if it bother you but
http://news.povray.org/search/?s=blur does not return as precise answer as I
wanted express.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks to Warp: I'll try this as soon as I digest it.
ABX: Could you please post an example of what it would do with, say, an
Arial Black uppercase "T"? Thanks. I'm looking for more rounding than the
example you showed, but perhaps it's a function of the starting shape.
"ABX" <abx### [at] abx art pl> wrote in message
news:e4m59voqjep5o5h06ojj5qabte823uoduv@4ax.com...
> On 8 Apr 2003 10:07:32 -0400, Warp <war### [at] tag povray org> wrote:
> > My idea: Instead of making a function which takes the .gray value of
> > the pigment function, make this function to take several .gray values
> > from the pigment function and average them together (perhaps with a
weight
> > value if you want).
>
> tests of my proxity/blur pattern:
http://news.povray.org/search/?s=proximity
>
> ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 8 Apr 2003 12:01:54 -0400, "Greg M. Johnson" <gregj:-)565### [at] aol com>
wrote:
> ABX: Could you please post an example of what it would do with, say, an
> Arial Black uppercase "T"? Thanks. I'm looking for more rounding than the
> example you showed, but perhaps it's a function of the starting shape.
http://news.povray.org/upf76ugdq6dlluklhiib1umos8qsk8k7hc%404ax.com
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Fascinating.
Right now the code says, "if any sample is close, return 1".
How could one change it to "the average of all the samples I collected" ?
"ABX" <abx### [at] abx art pl> wrote in message
news:los59vs9ml014990ptq5j85s862mvb2o9v@4ax.com...
>
> http://news.povray.org/upf76ugdq6dlluklhiib1umos8qsk8k7hc%404ax.com
>
> ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 8 Apr 2003 12:23:45 -0400, "Greg M. Johnson" <gregj:-)565### [at] aol com>
wrote:
> Right now the code says, "if any sample is close, return 1".
> How could one change it to "the average of all the samples I collected" ?
I'm affraid I do not understand the question or you do not understand code.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Greg M Johnson
Subject: Re: Turning squares into a smooth isosurface
Date: 8 Apr 2003 13:16:31
Message: <3e9303ef@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Got it. I changed the final line of your macro to:
function{ Proximity(x,y,z)}
I not only wanted rounding in the "armpits" of the T but also rounding off
of the extremities. The version posted in your link had *both* the points
closeby and the entirety of the object itself.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <8hr59voc6g4am2j1uhcmlti3nffc80pcj1@4ax.com>,
ABX <abx### [at] abx art pl> wrote:
> Sadly I'm not language expert but I looked into my dictionary and I think used
> algorithm fits in both.
Proximity
n. The state or fact of being near or next; nearness.
The proximity pattern uses the minimum or average distance to the
surface of the object, in other words, nearness. Your function returns a
value based on the volume of nearby space taken up by the object, which
is not at all the same thing. You can have proximity to flat objects
like triangles, or even single points, but they have no volume and will
be invisible to your function, which is closer to a convolution blur
matrix. A point 100 units from a triangle will be the same as one
immediately next to the triangle with your function.
"blur" or "smooth" would be accurate terms for describing your function,
"proximity" is not.
> Sorry if it bother you but http://news.povray.org/search/?s=blur does
> not return as precise answer as I wanted express.
http://news.povray.org/search/?s=proximity only gives something close
because of the wrong term being used to describe the function.
http://news.povray.org/povray.text.scene-files/22075/ would be better.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 08 Apr 2003 17:17:42 -0400, Christopher James Huff
<cja### [at] earthlink net> wrote:
>In article <8hr59voc6g4am2j1uhcmlti3nffc80pcj1@4ax.com>,
> ABX <abx### [at] abx art pl> wrote:
>
> > Sadly I'm not language expert but I looked into my dictionary and I think used
> > algorithm fits in both.
>
> Proximity
> n. The state or fact of being near or next; nearness.
Arent't near locations only highlighted in
http://news.povray.org/povray.binaries.images/22100/150459/proximity.jpg ?
> The proximity pattern uses the minimum or average distance to the
> surface of the object, in other words, nearness.
I know algorithm of your pattern from old MegaPOV but is there any other source
where such implementation of "proximity" exist ? Is "distance" the only
appearance of "proximity"? Can't blur with specified amount/radius builded over
monochrome pattern also mean proximity with clipped values ?
> You can have proximity to flat objects like triangles, or even single points,
> but they have no volume and will be invisible to your function.
IIRC I never stated I made 3D pattern. My intention was to build 2D pattern
builded only for cross-section of object. I never stated my solution was
perfect. I wanted isosurface beveling working on crossection of objects
(http://news.povray.org/povray.binaries.images/24383/ ) so I wanted to obtain 2D
effect similiar to proximity patch using blur until somebody reintroduce your
patch in 3.5. In further changes (which was never released) of this macro I
internally used f_r() function which simply returned distance. And that's why I
refer to it as "proximity/blur". I will try to remember to use this always in
that form in that future.
> > Sorry if it bother you but http://news.povray.org/search/?s=blur does
> > not return as precise answer as I wanted express.
>
> http://news.povray.org/search/?s=proximity only gives something close
> because of the wrong term being used to describe the function.
> http://news.povray.org/povray.text.scene-files/22075/ would be better.
No. Your proposed link is only 1/6 of my intention. 50% of my intention was to
point out that there is a search engine available and 50% was to point out that
there are _3_ threads from me related to the subject.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <oig79v0ogstjpldan48el31la2a9f1ulp3@4ax.com>,
ABX <abx### [at] abx art pl> wrote:
> Arent't near locations only highlighted in
> http://news.povray.org/povray.binaries.images/22100/150459/proximity.jpg ?
Yes, but the "highlighting" is not a function of nearness, but of the
amount of nearby space occupied by the object. The two often correlate,
and can be used for some of the same purposes, but they aren't the same
thing.
> > The proximity pattern uses the minimum or average distance to the
> > surface of the object, in other words, nearness.
>
> I know algorithm of your pattern from old MegaPOV but is there any
> other source where such implementation of "proximity" exist ? Is
> "distance" the only appearance of "proximity"? Can't blur with
> specified amount/radius builded over monochrome pattern also mean
> proximity with clipped values ?
Distance is what the word "proximity" means! It doesn't mean anything
like blur.
> > You can have proximity to flat objects like triangles, or even
> > single points, but they have no volume and will be invisible to
> > your function.
>
> IIRC I never stated I made 3D pattern.
And I didn't say anything about 3D or 2D. I'm talking about the
properties of solid vs. patch objects.
> In further changes (which was
> never released) of this macro I internally used f_r() function which
> simply returned distance.
Distance to < 0, 0, 0>. This is the proximity function for a single
point, and abs(f_r(x, y, z)-r) for a sphere. If you did something like
one of those, it was a proximity function, but a convolution blur isn't.
The only way I can think of to apply this to a convolution blur is to
use it to weight the samples.
There are two ways to compute proximity: define a proximity function for
the object, or compute it from points *on* the object's surface. The
insideness function is not sufficient...well, you *could* use it to
search for points very near the surface, but calculation would take
forever, and it would be nearly impossible to implement in POV functions.
> And that's why I refer to it as "proximity/blur". I will try to
> remember to use this always in that form in that future.
But it has nothing to do with proximity.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 09 Apr 2003 11:33:19 -0400, Christopher James Huff
<cja### [at] earthlink net> wrote:
> Distance is what the word "proximity" means!
http://www.google.com/search?q=%22proximity+means+distance%22
http://www.google.com/search?q=%22proximity+is+distance%22
I'm not english master. Not even advanced amateur. Can you provide me a
reference to definition that proximity is distance? There is no 'distance' in
http://dictionary.reference.com/search?q=proximity
> > In further changes (which was
> > never released) of this macro I internally used f_r() function which
> > simply returned distance.
>
> Distance to < 0, 0, 0>.
#declare f_distance=function(x1,x2,y1,y2){f_r(x2-x1,y2-y1,0)};
> This is the proximity function for a single point
As function without context it is. As part of my macro it is far more.
> If you did something like
> one of those, it was a proximity function
> (...)
> But it has nothing to do with proximity.
Hmmm. Two different opinions about the same usage of f_r().
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Tyler Eaves
Subject: Re: Turning squares into a smooth isosurface
Date: 9 Apr 2003 12:22:42
Message: <3e9448d1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
ABX wrote:
> On Wed, 09 Apr 2003 11:33:19 -0400, Christopher James Huff
> <cja### [at] earthlink net> wrote:
>> Distance is what the word "proximity" means!
>
> http://www.google.com/search?q=%22proximity+means+distance%22
> http://www.google.com/search?q=%22proximity+is+distance%22
>
> I'm not english master. Not even advanced amateur. Can you provide me a
> reference to definition that proximity is distance? There is no 'distance'
> in http://dictionary.reference.com/search?q=proximity
Sure there is.
Proximity: The state, quality, sense, or fact of being near or next;
closeness.
Near: To, at, or within a short distance or interval in space or time.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"ABX" <abx### [at] abx art pl> wrote in message
news:tlf89vcm9395bv5tg1oo3npqf4i08pve9n@4ax.com...
> On Wed, 09 Apr 2003 11:33:19 -0400, Christopher James Huff
> <cja### [at] earthlink net> wrote:
> > Distance is what the word "proximity" means!
<snip>
> I'm not english master. Not even advanced amateur. Can you provide me a
> reference to definition that proximity is distance? There is no 'distance'
in
Try http://dictionary.reference.com/ dictionary.com. Everyone should have
this link installed on their browser as a "bookmark" or "favorite". Their
online thesaurus is also quite good.
Entries from MeriamWebster, American Heritage and WordNet are available
there for "proximity". They all indicate the word refers to one thing being
"close" to another. But not necessarily in geometric distance; the closeness
could be in terms of some other attribute. So though there may be thousands
of miles between ABX and myself, our thoughts on a given topic may be in
close proximity. Or perhaps not. We could be in close physical proximity and
be worlds apart in our views about something.
I haven't been following the argument closely and have no opinion about the
matter in hand. But I do have strong opinions about the use and misuse of
words. And an especially strong opinion about individuals who attempt to ram
a particular definition down other people's throats. I'm not saying that is
happening here. But it does seem to me like the contenders in this dispute
are stepping ever more closely toward that line.
Remember that meaning is not attached to a word when it is spoken or
written. Meaning is attached to a word when it is listened to or read. There
is no such thing as an absolute definition-- there is only the definition
that your audience will use.
Now, back to the fights...
--
Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <tlf89vcm9395bv5tg1oo3npqf4i08pve9n@4ax.com>,
ABX <abx### [at] abx art pl> wrote:
> http://www.google.com/search?q=%22proximity+means+distance%22
> http://www.google.com/search?q=%22proximity+is+distance%22
Not sure what you expect these to turn up. A lack of results is not
surprising, they are very badly formed search queries.
This is better:
http://www.google.com/search?q=proximity+definition
> I'm not english master. Not even advanced amateur. Can you provide me a
> reference to definition that proximity is distance? There is no 'distance' in
> http://dictionary.reference.com/search?q=proximity
"The state, quality, sense, or fact of being near or next; closeness:"
Look up "closeness":
http://dictionary.reference.com/search?q=closeness
"immediate nearness"
http://dictionary.reference.com/search?q=nearness
Nothing about being blurred, smoothed, or fuzzed out. It's all about
distance, viewed as how near something is rather than how far it is.
> > If you did something like
> > one of those, it was a proximity function
> > (...)
> > But it has nothing to do with proximity.
>
> Hmmm. Two different opinions about the same usage of f_r().
For two different uses. One being a proximity function, the other being
a weighting for convolution samples, in which case the most likely use
is for proximity to the center of the convolution matrix, which is
independant of the input data.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 9 Apr 2003 10:36:07 -0700, "Will W" <wil### [at] NOSPAMwizzards net> wrote:
> Now, back to the fights...
I would rather call it 'investigation' (considering it is proper translation I
found).
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 09 Apr 2003 17:17:09 -0400, Christopher James Huff
<cja### [at] earthlink net> wrote:
> "The state, quality, sense, or fact of being near or next; closeness:"
>
> Look up "closeness":
> http://dictionary.reference.com/search?q=closeness
>
> "immediate nearness"
>
> http://dictionary.reference.com/search?q=nearness
>
> Nothing about being blurred, smoothed, or fuzzed out. It's all about
> distance, viewed as how near something is rather than how far it is.
I think you misunderstand me. My understanding is that proximity (closeness,
nearness) can be any function which is growing in direction to nearest point of
object. Not necessary linear like distance returned from intersection test. I do
not exclude distance, just allow other characteristics to express that something
is more near. That's why I'm looking for reference where it is stated that in
mathematical english proximity _is_ linear distance. In 'closeness' definition
you reffered I see "the spatial property resulting from a relatively small
distance;". Two things I see in this definition: 1) closeness is not distance
but can be function of it and 2) value of closeness in distace 'far' is the same
like in 'far*2' because only small values are considered. Output of my macro in
both forms (released (with blur) and not released (with distance measurement))
in my understanding fits in this definition. Please note I did not blured any
image, just monochrome pattern received from object cross-section. So what I
need? I need reference from you where is written that there is a convention in
3D computer graphics (or in 3D geometry in general) that 'proximity' is used to
name only function which results linear distance between given point and nearest
point of given object. Can you provide me such a reference?
> > > If you did something like
> > > one of those, it was a proximity function
> > > (...)
> > > But it has nothing to do with proximity.
> > Hmmm. Two different opinions about the same usage of f_r().
> For two different uses.
It seems we differently splited text in my paragraph. I have no idea how to
avoid it without useless discussion about understanding.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"ABX" <abx### [at] abx art pl> wrote in message
news:gr0a9vgkn8ni404li59nu9nn74m4fj7s56@4ax.com...
> On Wed, 9 Apr 2003 10:36:07 -0700, "Will W" <wil### [at] NOSPAMwizzards net>
wrote:
> > Now, back to the fights...
>
> I would rather call it 'investigation' (considering it is proper
translation I
> found).
>
> ABX
:-)
--
Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Who has greater proximity,
i) the point 1 mm from the tip of the flagpole atop a skyscaper,
or
ii) the point 2 mm from three surfaces inside a groove in the facade on the
middle story of the skyscraper
?
ABX's formula measures ii).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <f91a9v40mae692tpohmiaha5dg92al80l8@4ax.com>,
ABX <abx### [at] abx art pl> wrote:
> I think you misunderstand me. My understanding is that proximity
> (closeness, nearness) can be any function which is growing in
> direction to nearest point of object. Not necessary linear like
> distance returned from intersection test. I do not exclude distance,
> just allow other characteristics to express that something is more
> near.
But your function doesn't measure distance. Again, it measures the
amount of local volume occupied by the object, some objects have no
volume but definitely have proximity. A point is the simplest example of
this, examples of POV primitives would include triangles, bezier
patches, and polygons.
> That's why I'm looking for reference where it is stated that in
> mathematical english proximity _is_ linear distance.
Falloff rate doesn't matter, it is the "distance" part that does. Your
function isn't distance related. It is corellated with distance in many
cases, but it is not a function of distance.
> Can you provide me such a reference?
Any half-decent English dictionary is a sufficient reference. If you are
looking for a published paper on it, I doubt any such paper exists. I
used "proximity" because the word seemed to be the closest match to what
my pattern computed ("closeness" to the object), not because somebody
else used it. I would not have chosen it for your pattern, because it
isn't proximity.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |