|
![](/i/fill.gif) |
clipka wrote:
> This is nothing that could be caught during parsing. After all, how is
> POV-Ray supposed to know whether or not the function will be called with
> parameters value that will cause one of the sub-expressions to operate
> on invalid operands?
>
> For instance, if your function is
>
> function { 1 / (x+1) }
>
> then how should POV-Ray know whether you will make sure it isn't called
> for any x smaller than -1?
>
> > How do I fix it?
>
> The problem is most likely the subexpression
>
> log(y + 1)
>
> which is undefined for any y <= -1. So make sure the pattern's native
> range of y <= -1 is always outside whatever object it is applied to.
>
> Or clip the parameter to a safe range, e.g.:
>
> #local Temp_fnc3 = function
> {
> Temp_fnc1(x, log(max(0.0001,y+1)) / log(2),z).gray
> }
>
> which forces the parameter for log() to be no smaller than 0.0001.
As I pointed out in my second post, the error only occurs after I apply
the turbulence warp.
-Mike
Post a reply to this message
|
![](/i/fill.gif) |