//---------- // pov ray-tracing file, produced by solution_to_pov_pieces //---------- #include "colors.inc" background { White } //---------- // lighting //---------- // a ring of lights to light everything #declare numLights=31; #declare ang=0; #while (ang < 359) light_source { <0,0,9000> rgb .7/numLights rotate 40*x rotate ang*z } #declare ang=ang+(360/numLights); #end // main light light_source { <0,0,1000> .8*White area_light <100, 0, 0>, <100, 0, 5>, 7,7 rotate 55*x rotate -70*z } //---------- // camera //---------- #declare camera_elevation=25; #declare camera_bearing=-120; #declare camera_dist=12; #declare camera_ratio=1/2; camera { perspective direction -x right y*camera_ratio up z*camera_ratio location camera_dist*x rotate -camera_elevation*y rotate camera_bearing*z translate <.8,-1,3.7> } //---------- // the floor //---------- plane { z, -0.1 pigment { checker .95*White, 1*White scale 1 } finish { ambient .2 diffuse .8 } } //---------- // cubie definition //---------- #declare cubieCenter=<0.5,0.5,0.5>; #declare r=0.05; #declare ptSW=; #declare ptSE=<1-r,r,r>; #declare ptNE=<1-r,r,1-r>; #declare ptNW=; #declare threeEdges=union // rounded edges { cylinder { ptSW,ptSE,r } // southern edge (as viewed facing XZ plane) sphere { ptSE,r } // southeast corner cylinder { ptSE,ptNE,r } // eastern edge sphere { ptNE,r } // northeast corner cylinder { ptNE,ptNW,r } // northern edge } #declare cubie=union { box { ,<1-r,1-r,1> } box { ,<1-r,1-r,1> translate -cubieCenter rotate 90*x translate cubieCenter } box { ,<1-r,1-r,1> translate -cubieCenter rotate 90*y translate cubieCenter } object { threeEdges } object { threeEdges translate -cubieCenter rotate 90*z translate cubieCenter } object { threeEdges translate -cubieCenter rotate 180*z translate cubieCenter } object { threeEdges translate -cubieCenter rotate 270*z translate cubieCenter } } //---------- // axes (for debug) //---------- #if(0) cylinder { <0,0,0>,<7,0,0>,0.1 texture { pigment { color rgb <1,0,0> } finish { ambient 1 } } } cylinder { <0,0,0>,<0,7,0>,0.1 texture { pigment { color rgb <0,1,0> } finish { ambient 1 } } } cylinder { <0,0,0>,<0,0,7>,0.1 texture { pigment { color rgb <0,0,1> } finish { ambient 1 } } } #end //---------- // bounding box //---------- #declare r = 0.05; #declare col = <1,0,0>; #if(0) #if (clock < 10) cylinder { <0,0,0>,<4,0,0>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,0,0>,<4,4,0>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,4,0>,<0,4,0>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <0,4,0>,<0,0,0>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <0,0,4>,<4,0,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,0,4>,<4,4,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,4,4>,<0,4,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <0,4,4>,<0,0,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <0,0,0>,<0,0,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,0,0>,<4,0,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <4,4,0>,<4,4,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } cylinder { <0,4,0>,<0,4,4>,r texture { pigment { color rgb col } finish { ambient 1 } } } #end #end //---------- // the polycubes //---------- #macro make_piece(p,c) union { #declare ix = 0; #while (ix < dimension_size(p,1)) object { cubie translate p[ix] } #declare ix = ix + 1; #end pigment { rgb c } finish { phong 0.8 diffuse 0.6 ambient 0.2 } } #end // packing: // // E a E E // a a a b // a b b b // C C b C // // E E E E // D D c D // D D D D // C C C C // // G G c G // F F c F // B B c B // B B B B // // G G G G // F F F F // A A c A // A A A A // coloring graph: // (6 colors) // A(2): B(4) F(3) c(6) // B(4): A(2) C(3) D(5) F(3) c(6) // C(3): B(4) D(5) a(2) b(1) c(6) // D(5): B(4) C(3) E(4) F(3) G(1) a(2) b(1) c(6) // E(4): D(5) F(3) G(1) a(2) b(1) c(6) // F(3): A(2) B(4) D(5) E(4) G(1) c(6) // G(1): D(5) E(4) F(3) c(6) // a(2): C(3) D(5) E(4) b(1) c(6) // b(1): C(3) D(5) E(4) a(2) c(6) // c(6): A(2) B(4) C(3) D(5) E(4) F(3) G(1) a(2) b(1) #declare col1 = <0.698,0.071,0.005>; #declare col2 = <0.153,0.107,0.967>; #declare col3 = <0.049,0.964,0.975>; #declare col4 = <0.31,0.652,0.013>; #declare col5 = <0.855,0.761,0.941>; #declare col6 = <0.472,0.591,0.936>; // piece A #declare piece1 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,1,0>, <1,1,0>, <3,1,0> } #declare loc1 = <0,0,0>; #declare com1 = <27,13,7>/14.0; // piece B #declare piece2 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,1,0>, <1,1,0>, <3,1,0> } #declare loc2 = <0,0,1>; #declare com2 = <27,13,7>/14.0; // piece C #declare piece3 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,0,1>, <1,0,1>, <3,0,1> } #declare loc3 = <0,0,2>; #declare com3 = <27,7,13>/14.0; // piece D #declare piece4 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,1,0>, <1,1,0>, <3,1,0> } #declare loc4 = <0,1,2>; #declare com4 = <27,13,7>/14.0; // piece E #declare piece5 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,0,1>, <2,0,1>, <3,0,1> } #declare loc5 = <0,3,2>; #declare com5 = <29,7,13>/14.0; // piece F #declare piece6 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,0,1>, <1,0,1>, <3,0,1> } #declare loc6 = <0,2,0>; #declare com6 = <27,7,13>/14.0; // piece G #declare piece7 = array[7] { <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,0,1>, <1,0,1>, <3,0,1> } #declare loc7 = <0,3,0>; #declare com7 = <27,7,13>/14.0; // piece a #declare piece8 = array[5] { <0,0,0>, <0,1,0>, <1,1,0>, <2,1,0>, <1,2,0> } #declare loc8 = <0,1,3>; #declare com8 = <13,15,5>/10.0; // piece b #declare piece9 = array[5] { <1,0,0>, <0,1,0>, <1,1,0>, <2,1,0>, <2,2,0> } #declare loc9 = <1,0,3>; #declare com9 = <17,15,5>/10.0; // piece c #declare piece10 = array[5] { <0,0,0>, <0,0,1>, <0,1,1>, <0,2,1>, <0,1,2> } #declare loc10 = <2,1,0>; #declare com10 = <5,13,15>/10.0; #if (clock >= 1) object { make_piece(piece7,col1) translate loc7 } #end #if (clock >= 2) object { make_piece(piece6,col3) translate loc6 } #end #if (clock >= 3) object { make_piece(piece1,col2) translate loc1 } #end #if (clock >= 4 & clock < 10) object { make_piece(piece10,col6) translate loc10 } #end #if (clock >= 5) object { make_piece(piece2,col4) translate loc2 } #end #if (clock >= 6) object { make_piece(piece5,col4) translate loc5 } #end #if (clock >= 7) object { make_piece(piece4,col5) translate loc4 } #end #if (clock >= 8) object { make_piece(piece8,col2) translate loc8 } #end #if (clock >= 9) object { make_piece(piece9,col1) translate loc9 } #end #if (clock >= 10) object { make_piece(piece3,col3) translate loc3 } #end