|
![](/i/fill.gif) |
"nimda" <nomail@nomail> wrote:
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> > [snip]
> > #macro Basic_shape (Rpipe, Rsaddle)
> > 1 - sqrt
> > ( RE_fn_Blob2 (f_sphere (0, y, z, Rpipe), Rsaddle)
> > + RE_fn_Blob2 (f_sphere (x, 0, z, Rpipe), Rsaddle)
> > - RE_fn_Blob2 (f_sphere (x, y, z, Rpipe), Rsaddle)
> > )
> > #end
> > [snip]
>
> It seems to me that it should be verified that a number be tested
> to be positive before taking the square root out of it.
That wasn't it. As it turns out, RE_fn_Blob2() always returns a non-negative
number, and in this particular example, the value of the third term never
exceeds the sum of the first two. But you weren't expected to know that, so it
was a good guess anyway.
(A quick test showed that taking the square root of a negative number within an
isosurface does not cause an exception! That would have been a whole other
source of frustration; I would have expected the render to crash in that case,
and therefore would not have suspected that to be the problem if the render ran
to completion. Now I have something else to watch out for!)
Post a reply to this message
|
![](/i/fill.gif) |