POV-Ray : Newsgroups : povray.unofficial.patches : Getting Function Evaluation : Re: Getting Function Evaluation Server Time
1 Sep 2024 18:17:12 EDT (-0400)
  Re: Getting Function Evaluation  
From: Geoff Wedig
Date: 18 Dec 2000 13:53:10
Message: <3a3e5d16@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:

> In article <3a3e4b5e@news.povray.org>, Geoff Wedig 
> <wed### [at] darwinepbicwruedu> 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

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