|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
>
> Since you only have addition (or subtraction), your function is both
> associative and commutative with respect to the relevant terms.
Associative? Commutative?? Egads, who came up with those terms?? I have a vague
recollection of those things from... 100 years ago... :-P Subjunctive,
prepositional... oh, wait, those are English-language terms...
>
>
> You can also evaluate parts of your functions in
> POV-Ray and send the result to the #debug stream.
>
> #declare A = function (N) {sqrt(N)}
> #declare Result = A (27);
> #debug concat (str(Result, 0, DecimalPlaces), " \n")
Good idea; although in my case it's more of a visual result-- like the bumps
pattern affecting an isosurface. I have no clue as to how debug might be used
there.
>
> If you are unsure about changing things around, then you can start to separate
> terms in your functions into subfunctions and then start to recombine them.
> [snip]
That's really neat, and useful. I *still* struggle with understanding the finer
points of function use. Your examples (here and through the years) have been a
godsend...if I can only remember them! In my current code project, many are the
times that I came up with a workable solution only by sheer trial-and-error,
discarding one failed attempt after another. It's like trying to discern the
finer points of a 'foreign language' when I don't know or remember the subtle
underlying rules, from lack of practice.
Post a reply to this message
|
 |