|
![](/i/fill.gif) |
Among other things, myself wrote:
> It looks like the positive part
> is forced to have a period of 1 unit "superimposed" on whatever other
> period there might be.
That's exactly what's happening. In the source file pattern.cpp we find this
piece of code:
============================
static DBL gradient_pattern (VECTOR EPoint, TPATTERN *TPat)
{
DBL Result;
VDot( Result, EPoint, TPat->Vals.Gradient );
/* Mod to keep within [0.0,1.0] range */
return ((Result > 1.0) ? fmod(Result, 1.0) : Result);
}
============================
Replacing the last line with "return Result;" fixes the bug with my scene
file.
What's the purpose of this restriction to [0.0 1.0]? Isn't that the job of
the Evaluate_TPat routine (which has another fmod instruction)?
If this further enforcing is needed, shouldn't it be applied to negative
numbers too?
From my limited knowledge of povray innards, this looks to me like a genuine
bug. Is it?
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
![](/i/fill.gif) |