|
|
On Thu, 14 Mar 2002 15:06:32 +0300, "Vadim Sytnikov" <syt### [at] rucom> wrote:
> Ironically, what I'm talking about is that same flexibility...
All thigs you described lead you to reevaluation for every ray. "#If"
statement is used to return part of code at time of calling this "#if".
"select" statement is used to return float at time of calling this "select".
If we join them then for every call it should be reevaluated. Imagine such
example:
pigment{
function{
if(y>0)
pattern{object{
if(z>0)
sphere{0 1
else
box{-1 1
end
rotate x* if ( vlength(<x,y,z> > 1 ) 30 else (2+x+y+z) end
}}}
else
x+y+z
end
}
}
Of course everybody wants local variables in functions and more programing
features in functions but creation of function should be separated with runing
it. Note you could use loop: to create short function with loop started for
each call, or long function with loop started by preprocesor and called
unrolled but efficient. How can parser know what you want if you don't specify
this with different name for each loop keyword ?
ABX
Post a reply to this message
|
|