![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hello,
i'm a little bit confused, probably I just did soem very stuid bug, and I'm
to tired to find it...
My isosurface objects... disapare, where I set unnesesarly too big bounding
box, like :
isosurface {
function { x*x + y*y - 1 }
contained_by { box { -s, +s } }
accuracy 0.001
max_gradient 4
}
for s=2.0 everything is o.k.
for s=3.5 cylinder have holes
for s=6.0cynlinder dissapeare totally
why ?
also : .b.images .animation .source*
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote in
news:Xns### [at] 204 213 191 226
> isosurface {
> function { x*x + y*y - 1 }
> contained_by { box { -s, +s } }
> accuracy 0.001
> max_gradient 4
> }
> for s=2.0 everything is o.k.
> for s=3.5 cylinder have holes
After rendering s=5.04
Warning: The maximum gradient found was 10.996, but max_gradient of the
isosurface was set to 4.000. The isosurface may contain holes!
Adjust max_gradient to get a proper rendering of the isosurface.
But... for s=42 :
Warning: The maximum gradient found was 87.374, but max_gradient of the
isosurface was set to 15.000. The isosurface may contain holes!
Adjust max_gradient to get a proper rendering of the isosurface.
so... shat is the real max_gradient for this (tryvial) function ?
Shouldn't real max_gradient be same for all bounding boxes ?
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote in
news:Xns### [at] 204 213 191 226
[...]
isosurface {
function { min(1,max(-1,x*x + y*y - 1)) }
contained_by { box { -s, +s } }
accuracy 0.001
max_gradient 4
pigment { rgb <1,.2,.2> }
finish { specular 1 roughness 0.03 reflection .5 }
}
Adding min / max (clip) makes this object works for any 's' value.
Maybe clipping function value into range -1 .. +1 (or threshold-e ..
threshold+e where e is i.e. 1e-3) is a good idea ? Or not ?
AFAIK when using min(+e,max(-e, f(x,y,z) ))
bigger 'e' values lead to faster rendering, but on the other hand - need
bigger max_gradient.
smaller 'e' - vice-versa
Maybe it is worth better researching ? I will try to do it in spare time.
Does anyone have some somplex isosurfaces formulas that he may shere with
me (for testing purposes) ? TIA :)
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Thorsten Froehlich
Subject: Re: [stupid q.] isosurface bounding
Date: 27 Oct 2002 13:13:16
Message: <3dbc2cbc@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <Xns### [at] 204 213 191 226>, "Rafal 'Raf256' Maj"
<raf### [at] raf256 com> wrote:
> so... shat is the real max_gradient for this (trivial) function ?
Well, it is. Of course POV-Ray only determines the gradient inside the
finite bounding box. As you can easily see from the function, increasing
the bounding box size will also increase the gradient...
> Shouldn't real max_gradient be same for all bounding boxes ?
No.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> > function { x*x + y*y - 1 }
> so... shat is the real max_gradient for this (tryvial) function ?
>
> Shouldn't real max_gradient be same for all bounding boxes ?
The function's gradient increases farther away from the origin. That's
because it's a function related to the distance from the origin *squared*,
which gets bigger faster as you look at it farther from the origin. (Just
like y=x^2.)
If you want to use this function far away from the origin, it may actually
be faster to make it
function { sqrt(x*x + y*y) - 1 }
Since then the function will have a max_gradient of 1 *everywhere*.
In addition, since the cylinder never goes out more than 1 unit in the X or
Y directions, you may want to switch your contained_by box to
contained_by { box { <-1,-1,-s>, <1,1,s> } }
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <Xns### [at] 204 213 191 226>,
"Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote:
> Shouldn't real max_gradient be same for all bounding boxes ?
No. You obviously don't know what a gradient is...it is the slope, or
"rate of change" of the function. The gradient of your function
increases in the x and y directions, so bigger bounding boxes require
higher max_gradient values. If you don't increase that value, the solver
fails to find a surface.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christopher James Huff <chr### [at] mac com> wrote in news:chrishuff-
EC5### [at] netplex aussie org
> No. You obviously don't know what a gradient is...it is the slope, or
I do, ony I thought that only "vissible" (f(x,y,z) > threshold) part do
matter.
> "rate of change" of the function. The gradient of your function
> increases in the x and y directions, so bigger bounding boxes require
> higher max_gradient values. If you don't increase that value, the solver
> fails to find a surface.
Where can I find detailed explenation of how solver works, best - with some
step-by-stem examples how he do it ?
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <Xns### [at] 204 213 191 226>,
"Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote:
> > No. You obviously don't know what a gradient is...it is the slope, or
> I do, ony I thought that only "vissible" (f(x,y,z) > threshold) part do
> matter.
If it knew the intersection, it wouldn't need the max_gradient to
compute it. The whole area inside the bounds shape matters.
> Where can I find detailed explenation of how solver works, best - with some
> step-by-stem examples how he do it ?
The source code.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Thorsten Froehlich
Subject: Re: [stupid q.] isosurface bounding
Date: 27 Oct 2002 14:07:21
Message: <3dbc3969@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <Xns### [at] 204 213 191 226>, "Rafal 'Raf256' Maj"
<raf### [at] raf256 com> wrote:
>> "rate of change" of the function. The gradient of your function
>> increases in the x and y directions, so bigger bounding boxes require
>> higher max_gradient values. If you don't increase that value, the solver
>> fails to find a surface.
>
> Where can I find detailed explenation of how solver works, best - with some
> step-by-stem examples how he do it ?
That won't help you finding the gradient of a function in advance. To
determine the gradient of a function in advance you will need a good math
book, not a detailed description how to find isosurface intersections in
POV-Ray. In particular a step-by-step example won't possibly help you if
you don't understand the math behind it -- which I assume you don't because
you don't seem to know what a gradient is. Math books explaining how to
find the gradient of a function should be available in ever library. A good
selection should be available in your local university library. However, if
you don't know what a derivative is, you either did not learn it in school
or you have not yet learned it in school. Either way you will have to
(re)learn it to understand the topic...
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Rafal 'Raf256' Maj wrote:
>
> Maybe clipping function value into range -1 .. +1 (or threshold-e ..
> threshold+e where e is i.e. 1e-3) is a good idea ? Or not ?
It's mostly a bad idea, especially for small e it will take very long. You
better try to fit the bounding box as tight as possible around the surface.
With such a clipping you remove information of the function and introduce
unsteadiness. So it shows a weakness in the algorithm when doing this
speeds the rendering up.
- Micha
--
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org - The POV-Ray Book Project
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |