|
![](/i/fill.gif) |
"Mike" <win### [at] hotmail com> wrote in message
news:web.4938266b4d71081ac9b9f9f00@news.povray.org...
> Hi.
> I am trying to create a random phase within a sine function, but keep
> getting an
> error that a 'function identifier' is expected and I do not understand
> why.
>
> I am doing:
> #declare R1=seed(1153);
> #declare xspectrum =function{ sin ( x+ rand(R1) ) }
>
Hi Mike,
The help says it's not supported.
It's not one of the FLOAT_FUNCTIONS listed in the 'user defined functions'
section in the help.
Indeed the help specifies that only float functions that apply to float
values may be used, which excludes rand because it takes an Integer value
pointing to the predefined seed stream. Below the list of supported
functions in my copy of the help 'rand' is specifically used as an example
of functions that are not supported.
I think the reason for the constraint could be associated with the fact that
functions are able to be interpreted at render-time (rather than just during
the parse sequence). Someone may be able to give a more comprehensive
description (I'm at the limit of my understanding here).
Hate to be the bearer of bad news :-)
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |