POV-Ray : Newsgroups : povray.unofficial.patches : Getting Function Evaluation : Re: Getting Function Evaluation Server Time
1 Sep 2024 18:15:44 EDT (-0400)
  Re: Getting Function Evaluation  
From: Chris Huff
Date: 18 Dec 2000 12:31:27
Message: <chrishuff-AC1E80.12322918122000@news.povray.org>
In article <3a3e0bb8@news.povray.org>, Geoff Wedig 
<wed### [at] darwinepbicwruedu> wrote:

> No, it gave me an error.  I don't have the code here, so I can't tell 
> what error it was, but once I saw that, I began to wonder what 
> eval_pattern() was for in the first place, since it wasn't for that.

The eval_pattern() function returns the float value of a pattern at a 
specific point...for a function pattern, this should be the result of 
evaluating the function at that point, at least as long as the result is 
in the 0-1 range and you don't have any special waveforms, 
transformations, or warps applied. If you post the problem code I will 
try to figure out what's wrong...
Something like this macro *should* work for most cases:
#macro Eval_Func(Func, X, Y, Z)
    eval_pattern(function {Func}, < X, Y, Z>)
#end
Of course, that could also be written:
#macro Eval_Func(Func, Pt)
    eval_pattern(function {Func}, Pt)
#end
Where Pt is a 3D vector.

The problem might be in the implementation of the isosurface 
functions...I don't understand the code very well, but it uses a lot of 
global variables, and may only work at render time...I've had problems 
with it before, trying to get a function pigment to work(specifying 3 
functions, for red, green, and blue).

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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