|
 |
(posted on behalf of Thorsten Froehlich <thorsten [at] trf de> and
W³odzimierz ABX Skiba <abx [at] babilon org>)
I can confirm that the scene below shows a bug. Essentially under
certain conditions like the one found in the given scene, the parser
will overwrite some previously calculated values if a function result is
passed to another function at *parse* time and that function is also
evaluated at *parse* time. The workaround is to not use functions as
parameters to functions in the parser if those results are used at
*parse* time but to declare their results and then pass those to the
function.
NOTE: The problem only involves the use of functions in the *parser*!!!
When *rendering* functions (i.e. in isosurfaces) there is *no* problem!
Thorsten Froehlich
In article <ro8aku85qkqjh5ri08rr9ft0f3snko3qj8@4ax.com> , W„odzimierz
ABX Skiba <abx [at] babilon org> wrote:
> Here is simple script:
>
> <SDL>
> #include "functions.inc"
> #declare f_ynction(ph,rad){rad*cos(ph)}
> #macro Calc(X,Y,Z)
> #debug concat(
> " Y
> " function
> " parser
> "\n"
> )
> #end
> Calc(0, 2,0)
> Calc(2, 2,3)
> Calc(2, 1,3)
> Calc(2, 0,3)
> Calc(2,-1,3)
> Calc(2,-2,3)
> Calc(0,-2,0)
> </SDL>
>
> I expect it to display three identical columns of values as follow:
> Y
> Y
> Y
> Y
> Y
> Y
> Y
> unfortunatelly it outputs various values when ph function is accesed vi
a
> another function:
> Y
> Y
> Y
> Y
> Y
> Y
> Y
> Any idea why ? Any confirmation that it can be a bug ?
____________________________________________________
Thorsten Froehlich
e-mail: mac-team [at] povray org
I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |