POV-Ray : Newsgroups : povray.advanced-users : isosurface: Does the order of multiple functions matter? : Re: isosurface: Does the order of multiple functions matter? Server Time
29 Mar 2024 04:48:38 EDT (-0400)
  Re: isosurface: Does the order of multiple functions matter?  
From: Kenneth
Date: 28 Jan 2023 11:20:00
Message: <web.63d54b169b90547b9b4924336e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.