"Serious Putty" <nomail@nomail> wrote in
news:web.3f08e54f2a66c56848cb617a0@news.povray.org:
> I've been trying to generate a new kind of pattern by use of macros
> and am unable to use the individual coordinates of the point being
> evaluated for the pattern.
>
> This works:
>
> #macro crn()
> (x - int(x))
> #end
>
> This does not:
> #macro crn()
> #declare a = int(x);
> (x - a)
> #end
>
> Why?
>
> What I want to do is get the x, y, and z values of the point being
> evaluated by pigment{function{crn()} ...
Because macros are only executed at parse-time.
It also seems like you are trying to make some kind of local
variable for your function with the #declare a = int(x) statement.
But functions cannot have local variables.
Tor Olav
Post a reply to this message
|