|
|
On 10/03/2016 10:11 AM, Bald Eagle wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> On 10/03/2016 08:06 AM, John Greenwood wrote:
>
>>> #declare Change = true;
>>> #declare Function = function( F){select(Change,F,-F)}
>
>> Note there are two select variants. ....
>> Then a second form which supports both such transitions and the boolean
>> form.
>
>
> So, the thing(s) to try would be:
>
> #declare Change = true;
> #declare Function = function (F) { select(Change, F, F, -F) }
>
> or
>
> #declare Function = function (F) { select(Change, F, -F, -F) }
>
> Correct?
>
>
The 'boolean' returns 0 or 1 and so triggers only the last two of the
negative, zero or positive selections in order.
Perhaps play with this code:
#version 3.7;
global_settings { assumed_gamma 1 }
#include "functions.inc"
#debug "\n---\n"
#debug concat("select((1<0),-1.0,0.0,1.0) ==> ",
str(select((1<0),-1.0,0.0,1.0),0,4)," \n")
#debug concat("select(false,-1.0,0.0,1.0) ==> ",
str(select(false,-1.0,0.0,1.0),0,4)," \n")
#debug concat("select((1>0),-1.0,0.0,1.0) ==> ",
str(select((1>0),-1.0,0.0,1.0),0,4)," \n")
#debug concat("select(true,-1.0,0.0,1.0) ==> ",
str(select(true,-1.0,0.0,1.0),0,4)," \n")
#debug concat("select(-1,-1.0,0.0,1.0) ==> ",
str(select(-1,-1.0,0.0,1.0),0,4)," \n")
#debug "---\n"
#error "Stop before actual render for demonstration code."
Bill P.
Post a reply to this message
|
|