POV-Ray : Newsgroups : povray.general : Differences in rendering 3.50c vs. 3.6.1 : Re: Differences in rendering 3.50c vs. 3.6.1 Server Time
2 Aug 2024 14:20:33 EDT (-0400)
  Re: Differences in rendering 3.50c vs. 3.6.1  
From: Mike Williams
Date: 26 Nov 2004 00:47:46
Message: <Mr9QFCAsNspBFwUk@econym.demon.co.uk>
Wasn't it Slime who wrote:
>
>I don't quite follow you, but since you seem to understand the problem, do
>you think there is any sort of workaround (aside from never relying on
>passing variables by reference)?

You could load the variables with values that the macro is unlikely to
return, perform tests after the macro call to see if they're unchanged
and call the macro again. Because the problem occurs at widely separated
intervals, a second call will succeed. You need to think about whether
the macro has any side effects which shouldn't be duplicated.

E.g. in the original Tsutomo Higo scene we could write:

 #declare M = 0; #while (M<3)
   #declare Cp[T][L][M] = 12345;
 #declare M = M+1; #end
 Wave (Cp[T][L][0], Cp[T][L][1], Cp[T][L][2], T+Ncase, L)
 #if (Cp[T][L][0] = 12345 | Cp[T][L][1] = 12345 | Cp[T][L][2] = 12345)
   Wave (Cp[T][L][0], Cp[T][L][1], Cp[T][L][2], T+Ncase, L)
 #end

The Wave() macro doesn't have any side effects and can't ever validly
return the value 12345, so if one of the outputs is still 12345 we call
the macro again.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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