// Bug test code. // POV SDL code based on example code from POV documentation modified // by Wolfgang Wieser to show bug. global_settings {assumed_gamma 1.0} background {rgb <1,1,1>} camera { location <0,10,0> right x look_at <0,0,0> angle 44 translate <1.5,0,1.5> } light_source {<500,500,-500> rgb 1 } #macro Test(fact) #declare B11=<0,0,3>; #declare B12=<1,0,3>; // #declare B13=<2,0,3>; #declare B14=<3,0,3>; // row 1 #declare B21=<0,0,2>; #declare B22=<1,0,2>; // #declare B23=<2,0,2>; #declare B24=<3,0,2>; // row 2 #declare B31=<0,0,1>; #declare B32=<1,0,1>; // #declare B33=<2,0,1>; #declare B34=<3,0,1>; // row 3 #declare B41=<0,0,0>; #declare B42=<1,0,0>; // #declare B43=<2,0,0>; #declare B44=<3,0,0>; // row 4 #declare Points=array[16]{ B11, B12, B13, B14, B21, B22, B23, B24, B31, B32, B33, B34, B11*fact+B41*(1-fact), B42, B43, B44 } bicubic_patch { type 1 flatness 0.001 u_steps 4 v_steps 4 uv_vectors <0,0> <1,0> <1,1> <0,1> Points[0], Points[1], Points[2], Points[3], Points[4], Points[5], Points[6], Points[7], Points[8], Points[9], Points[10], Points[11], Points[12], Points[13], Points[14], Points[15] uv_mapping texture { pigment { checker color rgbf <1,1,1,0.5> color rgbf <0.4,0.4,0.4,0.7> scale 1/6 } finish {phong 0.6 phong_size 20} } //no_shadow } #declare I=0; #while (I<16) sphere { #switch(I) #case(0)#case(3)#case(12)#case(15)Points[I],0.15 #break #else Points[I],0.08 #break #end no_shadow pigment{ #switch(I) #case(0) color rgb <1,0,0> #break #case(3) color rgb <0,0,2> #break #case(12) color rgb <0,1,0> #break #case(15) color rgb <1,1,0> #break #else color rgb <0,1,1> #break #end } } #declare I=I+1; #end #end // macro union { Test(0) translate <-2,0,2> } union { Test(0.5) translate <2,0,2> } union { Test(0.9) translate <-2,0,-2> } union { Test(1) translate <2,0,-2> }