





 
 




 
 


How come this doesn't parse:
#local V = <0,1,2>;
#local f = function(x,y,z){ sin(x*V.x) }
but this does:
#local V = <0,1,2>;
#local Vx = V.x;
#local f = function(x,y,z){ sin(x*Vx) }
Post a reply to this message


 
 




 
 


scott <sco### [at] scottcom> wrote:
> How come this doesn't parse:
>
> #local V = <0,1,2>;
> #local f = function(x,y,z){ sin(x*V.x) }
>
> but this does:
>
> #local V = <0,1,2>;
> #local Vx = V.x;
> #local f = function(x,y,z){ sin(x*Vx) }
Vectors don't work in functions. Nothing vectorlike will work, except if your
function is a special vector function (defined as a transform or a spline).
Everything else is scalaronly.
This message is better suited for the "newusers" section.
Post a reply to this message


 
 




 
 


"Simon Copar" <inf### [at] gmailcom> wrote:
> scott <sco### [at] scottcom> wrote:
> > How come this doesn't parse:
> >
> > #local V = <0,1,2>;
> > #local f = function(x,y,z){ sin(x*V.x) }
> >
> > but this does:
> >
> > #local V = <0,1,2>;
> > #local Vx = V.x;
> > #local f = function(x,y,z){ sin(x*Vx) }
>
> Vectors don't work in functions. Nothing vectorlike will work, except if your
> function is a special vector function (defined as a transform or a spline).
> Everything else is scalaronly.
>
> This message is better suited for the "newusers" section.
Maybe it was a way of asking 'Could functions in POVRay 4.0 be general enough
to
handle vectors, and basically anything ou would expect from a regular
computerscience function ?', which is an interesting question, altough probably
an already asked one.
Post a reply to this message


 
 




 

