|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hellow,
what exacly does max gradient mean, in mathemaical therms ?
Maybe small example ?
AFAIK this is not the min/max vaule of function ?
how can I calculate max gradient ?
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj wrote:
>
> Hellow,
> what exacly does max gradient mean, in mathemaical therms ?
The gradient is the vector of the partial derivatives. ;-)
or:
grad(f) = <df/dx, df/dy, df/dz>
> Maybe small example ?
For calculating derivatives?
> AFAIK this is not the min/max vaule of function ?
> how can I calculate max gradient ?
Hmm, i wonder if you actually looked into the manual:
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Rafal 'Raf256' Maj who wrote:
>Hellow,
>what exacly does max gradient mean, in mathemaical therms ?
The gradient is the rate at which the function value changes across
space. The max_gradient specifies a maximum value that you think that
the gradient might reach.
When POV evaluates the function at a particular point that's not on the
surface, then it can work out that it doesn't need to check any other
points within a distance given by function_value/max_gradient.
>Maybe small example ?
Lets consider a one dimensional example, and try to find the points that
satisfy the function "x*x-1" contained by the interval [-2,2], threshold
zero.
I happen to be able to differentiate "x*x-1", and get the result that
the gradient is "2*x". The maximum value of 2*x in the interval [-2,2]
is 4. So max_gradient=4.
Now lets try to evaluate "x*x-1 = 0" with a one-dimensional ray tracer.
It starts by guessing one of the end points of the container interval,
say x=2. At x=2 the function evaluates to 3. Since the ray tracer has
been told that the max_gradient is 4, it knows that there can't be a
solution between 1.25 and 2, and thus reduces the size of the region it
needs to scan.
If, however, we were to lie to the ray tracer and tell it that the
maximum gradient of the function was 1.5, then it would "know" that
there couldn't possibly be a solution between 0 and 2 and would then
fail to spot the solution at x=1.
>AFAIK this is not the min/max vaule of function ?
It's the maximum rate of change of the function value as you move in any
direction.
>how can I calculate max gradient ?
For some simple functions its possible to calculate it by using three
dimensional partial derivatives. You need to evaluate the Grad of the
function and then find the largest value that the Grad can take anywhere
within the contained_by space.
With complicated functions, this is not feasible. The best thing to do
is to take a wild guess, and then make a small render of the isosurface
and read what POV says in the message pane.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann <chr### [at] gmxde> wrote:
> grad(f) = <df/dx, df/dy, df/dz>
You should have explained what do you need the derivatives for... :)
--
#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
|
|
| |
| |
|
|
|
|
| |
|
|