| 
  | 
There seems to be a bug when testing inside() with some prisms and a point 
on the bisector of an angle, where the bisector is the x-axis, but I 
haven't found any report on this. The following code should demonstrate the 
problem:
   #include "colors.inc"
   #default{finish{ambient 1}}
   camera {orthographic location 4*y look_at 0}
   background {color Gray50}
   #declare Bound =
   prism {
      linear_spline
      -1, 1, 3,
      //These don't work
      //<-1, 0>, < 1, 1>, < 0, 0>, < 1,-1>, <-1, 0>
      //< 1, 1>, <-1, 1>, < .5, 0>, <-1,-1>, < 1,-1>
      <-1, 1>, < 0, 0>, <-1,-1>
      //<-1,-1>, < 1, 0>, <-1, 1>
      //This one works as expected
      //< 1, 1>, < 0, 0>, < 1,-1>
      //rotate 360*y
   };
   object {Bound pigment {color Blue}}
   #declare j = -10;
   #while (j < 10)
      #declare i = -10;
      #while (i < 10)
         sphere {
            <i, 1, j>, .02
            pigment {
               #switch ( inside(Bound, <i, 0, j>) )
                  #case (0) color Red #break
                  #case (1) color Green #break
                  #else color Yellow #break
               #end
            }
         }
         #declare i = i+.25;
      #end
      #declare j = j+.25;
   #end
When I render this on PovWin 3.6.1a the spheres along the x-axis are all 
but one red even where the tested points are clearly inside the prism and 
should be green. The other prisms have similar problems and I can't 
reproduce this behavior along the z-axis. After rotating the prism object 
by 360 degrees around the y-axis, the inner spheres colors are correct. Can 
anyone confirm this?
I'm using Windows 2000 SP4 on an Intel P4 @ 1800 MHz with 512MB.
 Post a reply to this message 
 | 
  |