POV-Ray : Newsgroups : povray.advanced-users : Strange pigment error (3.6.1) : Re: Strange pigment error (3.6.1) Server Time
1 Jul 2024 06:09:55 EDT (-0400)
  Re: Strange pigment error (3.6.1)  
From: SharkD
Date: 11 Sep 2009 16:55:02
Message: <4aaab926$1@news.povray.org>
SharkD wrote:
> I'm using the following pigment:
> 
> #local Temp_fnc1 = function {pigment {spherical}}
> #local Temp_fnc3 = function
> {
>     Temp_fnc1(x, log(y + 1) / log(2),z).gray
> }
> 
> 
> The image actually *renders* most of the way. But about 3/4 done it 
> quits with the error, "Parse Error: Floating-point exception detected in 
> function 'Temp_fnc3'. Your function either attempted a division by zero, 
> used a function outside its domain or called an internal function with 
> invalid parameters."
> 
> Aren't parse errors supposed to occur *before* the image begins 
> rendering? How do I fix it?
> 
> -Mike

Oops! I made a mistake when copying the function. Here's the actual code:

#local Temp_fnc1 = function
{
	1 - min(1, sqrt(x*x + y*y + z*z))
}
#local Temp_fnc3 = function
{
	max(0,min(1,Temp_fnc1(x, log(y + 1) / log(2),z)))
}

And the warp:

warp
{
	turbulence	<1/4,1/64,1/4,>
	octaves		4
	lambda		2
	omega		1/2
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.