|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It seems to me the following two pieces of code should produce the same
result (they don't).
Can anyone tell me why? (I thought they should both be spheres, but code #1
makes a really odd
distorted shape)
code #1:
#declare x_val=function(x^2)
#declare y_val=function(y^2)
#declare z_val=function(z^2)
#declare end_val=function(x_val+y_val+z_val)
isosurface
{
function{end_val} threshold .75 sign 1
pigment {rgb 1}
}
and
code #2:
#declare end_val=function(x^2+y^2+z^2)
isosurface
{
function{end_val} threshold .75 sign 1
pigment {rgb 1}
}
thanks,
Quadhall
tre### [at] ww-interlinknet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't know if this is it, but I thought when using a declared function in
megaPOV you were supposed to include (x,y,z) after it.
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricynet>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it hall who wrote:
>It seems to me the following two pieces of code should produce the same
>result (they don't).
>Can anyone tell me why? (I thought they should both be spheres, but code #1
>makes a really odd
>distorted shape)
>
>code #1:
>
>#declare x_val=function(x^2)
>#declare y_val=function(y^2)
>#declare z_val=function(z^2)
>#declare end_val=function(x_val+y_val+z_val)
>isosurface
>{
> function{end_val} threshold .75 sign 1
> pigment {rgb 1}
>}
For some reason the max_gradient guesser has failed to produce the
correct result in this case, and the resulting surface does not
correspond to the mathematics of the function. To fix it you need to
tell it the correct max_gradient.
Step 1: add the "eval" keyword and render. This produces a rendering
that looks much more like the correct surface (but often has an
incorrect shadow), but it causes the correct value of max_gradient to
the log. In this case the actual max_gradient was 2.762
Step 2: Replace the "eval" keyword that you added in step 1 by
"max_gradient 2.762". This now produces a surface that is almost
identical to code #2.
You can use a higher value of max_gradient, which will also produce
correct results, but will take longer to render.
--
Mike Williams + #
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote ........
Thanks for the info, will see what I can do with it.....
Quadhall
tre### [at] ww-interlinknet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |