POV-Ray : Newsgroups : povray.advanced-users : Function logic? : Re: Function logic? Server Time
28 Jul 2024 16:15:10 EDT (-0400)
  Re: Function logic?  
From: Alain
Date: 6 Dec 2004 17:26:21
Message: <41b4dc8d$1@news.povray.org>
Mike Williams nous apporta ses lumieres ainsi en ce 2004-12-06 13:27... :

>Wasn't it Tim Nikias who wrote:
>  
>
>>>What you need to change is the original declaration of Snowfunction,
>>>which is somewhere outside your macro. Stick a ".x" on that declaration
>>>and you'll be working with non-pigment functions throughout.
>>>      
>>>
>>Another thing: Where exactly do I put that ".x"? I've got
>>#declare Snow_Pig_Turb = pigment{bozo color_map{[0 rgb 1][1 rgb .85]}}
>>#declare SnowFunction = function{pigment{Snow_Pig_Turb}}
>>    
>>
>
>I think you need to add an extra step
>
>#declare Snow_Pig_Turb = pigment{bozo color_map{[0 rgb 1][1 rgb .85]}}
>#declare Pig_Function = function{pigment{Snow_Pig_Turb}}
>#declare SnowFunction = function{Pig_Function(x,y,z).x}
>
>  
>
Acording to the documentation spotted is identical to bozo, without a 
default colour_map. Try:
#declare Pat_Function = function{pattern{spotted}}
#declare SnowFunction = function{Pat_Function(x,y,z) * 0.15 +0.85}// 
limit to the 0.85 to 1 range

Alain


Post a reply to this message

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