|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> wrote:
> In article <3a3e4b5e@news.povray.org>, Geoff Wedig
> <wed### [at] darwin epbi cwru edu> wrote:
>> Hmm, this is a deformation formula, so it ranges quite far (much further
>> than [0..1]. I'll check to see what error it gave when I get the chance.
> Ah, than this bit of code:
> value = ((value > 1.0) ? fmod(value, 1.0) : value);
> will cause you some problems...it shouldn't make an error though, it
> will just make it repeat the [0, 1] range.
> I'm thinking of modifying the pattern feature to allow values outside of
> [0, 1] to let these "special cases" work properly, it shouldn't be a big
> problem for older scenes. Also, I did write up a bit of code for
> allowing functions to be evaluated directly, but I never tested it. I
> posted it here or in povray.programming...maybe I will get back to work
> on it.
That would be the perfect solution, but creation a function and macro pair
isn't *too* awful, I've found. This code was originally intended to
automatically calculate the bounding box of an isosurface based upon a
distorted coordinant space. In fact, I need both forms of transformation
(to/from the new coordinants), so I couldn't have used the same function as
it eventually turned out, and ended up having to write the macros.
Geoff
Post a reply to this message
|
![](/i/fill.gif) |