//****************************************************************************************** //* Sakktábla //* Készítette: Gaf //* Web: www.raytracer.hu //* 2008.05.18 //****************************************************************************************** ///////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /////////////////////alphaQuad changes 2008.08.22\\\\\\\\\\\\\\\\\\\\\\ /////////////////////basically new board and Rook\\\\\\\\\\\\\\\\\\\\\\ //////////phong levels lowered to accommodate wood textures\\\\\\\\\\\\ /////////Englishified for my use, posted due to "enthuthiasm"\\\\\\\\\\ #include "colors.inc" #include "shapes.inc" global_settings { max_trace_level 10 photons { //If spacing is used, it specifies approximately the average distance between photons // on surfaces. If you cut the spacing in half, you will get four times as many // surface photons, and eight times as many media photons spacing 0.00003 count 120000 max_trace_level 10 //autostop 0 //jitter .4 default } } camera { location <6.75,5.25,-9>*1 look_at <2,0.2,-3> angle 48 up y right x*image_width/image_height } #declare boardfinish = finish { ambient .15 diffuse .6 phong .6 phong_size 50 reflection 0.025 } #declare p_yelwood = pigment { wood color_map { [.4 rgb <.9, .7, .4>] [.6 rgb <1, .8, .6>] } turbulence .5 scale <1, 1, 10>*.5 } #declare lightwood = texture { pigment { p_yelwood } finish { boardfinish } scale 0.3 } #declare p_darkwood = pigment { wood color_map { [.4 rgb <0.45, 0.30, 0.15>]//*.8] //next one will try darker darkwood [.6 rgb <0.60, 0.35, 0.20>]//*.8] } turbulence .5 scale <1, 1, 10>*.5 } #declare p_darkwood_table = pigment { wood color_map { [.4 rgb <0.45, 0.30, 0.15>] [.6 rgb <0.60, 0.35, 0.20>] } turbulence .5 scale <1, 1, 10>*.5 } #declare darkwood = texture { pigment { p_darkwood } finish { boardfinish } scale 0.3 } #declare darkwoodr = texture { pigment { p_darkwood } finish { boardfinish } scale 0.3 rotate <0,90,0> } #declare darkwoodtable = texture { pigment { p_darkwood } finish { boardfinish } scale 0.3 rotate <0,60,0> } plane { <0, 1, 0>, 0 texture { pigment { p_darkwood_table } //finish { ambient .2 diffuse .6 phong .8 phong_size 40 reflection 0.025 } finish { boardfinish } scale 0.3 rotate <0,60,0> } translate <0,-0.3,0> } //vlen = 22.2 can tell pov to orient also #declare _z_ = <3,0,-3>-<-17,10.4,10.4>; #declare _x_ = vnormalize(vcross(y,_z_))*15; #declare _y_ = vnormalize(vcross(_z_,_x_))*15; light_source { <-17,10.4,10.4> color rgb <1,1,0.9>*1 spotlight radius 7 falloff 24 point_at <3,0,-3> area_light _x_,_y_, 13,13 adaptive 1 jitter circular //orient photons{ reflection on refraction on } } #declare DarkPlayerTexture = texture { pigment { color rgb<1,0.8392,0> filter 0.98 } finish { ambient .2 diffuse .6 phong .15 phong_size 5 reflection 0.15 } }; #declare DarkPlayerInterior = interior { ior 1.51714 caustics 1.0 fade_power 12 }; #declare LightPlayerTexture = texture { pigment { color rgb<1,1,1> filter 0.98 } finish { ambient .2 diffuse .6 phong .15 phong_size 5 reflection 0.15 } }; #declare LightPlayerInterior = interior { ior 1.51714 caustics 1.0 fade_power 12 }; #declare _Pawn = lathe { bezier_spline 20, <0, 9>, <3, 9>, <2.5, 5>, <1, 5>, <1, 5>, <1, 2>, <2, 0>, <3, 0>, <3, 0>, <3.5, 0>, <3.5, -0.5>, <3, -0.5>, <3, -0.5>, <3, -1>, <3.5, -2>, <3, -2>, <3, -2>, <1, -2>, <1, -2>, <0, -2> translate <0,2,0> }; #declare _Bishop = lathe { bezier_spline 24, <0, 12>, <3, 12>, <0.7, 11>, <0.7, 9>, <0.7, 9>, <3, 9>, <2.5, 5>, <1, 5>, <1, 5>, <1, 2>, <2, 0>, <3, 0>, <3, 0>, <3.5, 0>, <3.5, -0.5>, <3, -0.5>, <3, -0.5>, <3, -1>, <3.5, -2>, <3, -2>, <3, -2>, <1, -2>, <1, -2>, <0, -2> translate <0,2,0> }; #declare _Rook1 = lathe { bezier_spline 28, <0, 9>, <2, 9>, <0, 9>, <2.5, 9>, <2.5, 9>, <3, 5.5>, <2.75, 7>, <3, 5.5>, <3, 5.5>, <1.25, 5>, <3, 5.6>, <1.25, 5>, <1.25, 5>, <1.25, 2>, <2, 0>, <3, 0>, <3, 0>, <3.5, 0>, <3.5, -0.5>, <3, -0.5>, <3, -0.5>, <3, -1>, <3.5, -2>, <3, -2>, <3, -2>, <1, -2>, <1, -2>, <0, -2> translate <0,2,0> }; #declare _Queen = lathe { bezier_spline 28, <0, 14>, <2, 14>, <2.5, 12>, <0.5, 12>, <0.5, 12>, <5, 12>, <1.25,10>, <1.25, 6>, <1.25, 6>, <1.5, 6>, <3.5, 4>, <1.25, 4>, <1.25, 4>, <1.25, 2>, <2, 0>, <3, 0>, <3, 0>, <3.5, 0>, <3.5, -0.5>, <3, -0.5>, <3, -0.5>, <3, -1>, <3.5, -2>, <3, -2>, <3, -2>, <1, -2>, <1, -2>, <0, -2> translate <0,2,0> }; #declare _King = merge { object { lathe { bezier_spline 28, <0.5, 12>, <0.6, 12>, <0, 12>, <0.5, 12>, <0.5, 12>, <5, 12>, <1.25,10>, <1.25, 6>, <1.25, 6>, <1.5, 6>, <3.5, 4>, <1.25, 4>, <1.25, 4>, <1.25, 2>, <2, 0>, <3, 0>, <3, 0>, <3.5, 0>, <3.5, -0.5>, <3, -0.5>, <3, -0.5>, <3, -1>, <3.5, -2>, <3, -2>, <3, -2>, <1, -2>, <1, -2>, <0, -2> translate <0,2,0> } } cylinder { <0,12,0>, <0,16.5,0>, 0.5} cylinder { <-1,15.5,0>, <1,15.5,0>, 0.5}}; #declare _Knight = difference { object { merge { object { lathe { bezier_spline 12, <3, -2>, <1, -2>, <1, -2>, <0, -2>, <3, -2>, <4, -2>, <4, -1>, <3, -1>, <3, -1>, <2, -1>, <1.5, 1>, <1.5, 3> translate <0,2,0> } } sphere { <0, 6,0>, 3 } sphere { <0, 11,0>, 3 } cylinder { <0, 6,0>, <0, 11,0>, 3 } } } cylinder { <21, 14,-4>, <21, 14, 4>, 20 } cylinder { <-21, 14,-4>, <-21, 14, 4>, 20 } cylinder { <-4, 15,-3.7>, <4, 15, -3.7>, 3.4 } cylinder { <-4, 14,-1>, <4, 14, -1>, 1 } cylinder { <-4, 15.5, 4>, <4, 15.5, 4>, 4 } cylinder { <-4, 10,-0.6>, <4, 10, -0.6>, .5 } box { <-4, 10.5, 2>, <4, 9.5, -2> rotate <-15,0,0> translate <0, -0.2, 0> } box { <-4, 10.5, 2>, <4, 9.5, -2> rotate <-45,0,0> translate <0, 1.5, 5> } cylinder { <-4, 9,-3>, <4, 9, -3>, 1 } cylinder { <0, 14,-4>, <0, 14, 4>, .5 } } #declare _Rook = difference { lathe { bezier_spline 36, <0,6.506667>,<0.533333,6.506667>,<1.226667,6.506667>,<1.546667,6.64>, <1.546667,6.64>,<2,6.72>,<1.493333,8.4>,<1.813333,8.96>, <1.813333,8.96>,<1.973333,9.093333>,<2.213333,9.12>,<2.5,9>, <2.5,9>,<2.88,7.786667>,<2.986667,6.933333>,<3,5.5>, <3,5.5>,<2.666667,5.173333>,<1.466667,5.386667>,<1.25,5>, <1.25,5>,<1.25,2>,<2,0>,<3,0>, <3,0>,<3.5,0>,<3.721712,-0.613482>,<3.733333,-1.066667>, <3.733333,-1.066667>,<3.746667,-1.586667>,<3.5,-2>,<3,-2>, <3,-2>,<1,-2>,<1,-2>,<0,-2> } box { <-.5, 7.5, -4>, <.5, 10, 4> } box { <-4, 7.5, -.5>, <4, 10, .5> } translate <0,2,0> } #declare Dark_Pawn = object { _Pawn texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Dark_Bishop= object { _Bishop texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Dark_Rook = object { _Rook texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Dark_Queen = object { _Queen texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Dark_King = object { _King texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Dark_Knight= object { _Knight texture { DarkPlayerTexture } hollow on interior { DarkPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_Pawn = object { _Pawn texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_Bishop= object { _Bishop texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_Rook = object { _Rook texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_Queen = object { _Queen texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_King = object { _King texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; #declare Light_Knight= object { _Knight texture { LightPlayerTexture } hollow on interior { LightPlayerInterior } photons { target reflection on refraction on } scale .1 }; /* object { Dark_Pawn translate <3.5, 0, 1.5> } object { Dark_Pawn translate <2.5, 0, 2.5> } object { Dark_Pawn translate <1.5, 0, 2.5> } object { Dark_Pawn translate <0.5, 0, 1.5> } // E6 object { Dark_Pawn translate <-0.5, 0, 0.5> } // D5 object { Dark_Pawn translate <2.5, -0.3, -5.5> } // captured object { Dark_Pawn translate <-2.5, 0, 2.5> } object { Dark_Pawn translate <-3.5, 0, 2.5> } object { Dark_Knight rotate <0,-30,0> translate <-1.5, 0, 1.5> } // C6 object { Dark_Knight rotate <0,-15,0> translate <2.5, 0, 1.5> } // G6 object { Dark_Rook translate <-3.5, 0, 3.5> } object { Dark_Rook translate <3.5, 0, 3.5> } object { Dark_Bishop translate <-0.5, 0, 2.5> } // D7 object { Dark_Bishop translate <1, -0.3, -5.7> } // captured object { Dark_Queen translate <-3.5, 0, 0.5> } // A5 object { Dark_King translate <0.5, 0, 3.5> } object { Light_Pawn translate <3.5, 0, -1.5> } // H4 object { Light_Pawn translate <2.5, 0, -1.5> } // G4 object { Light_Pawn translate <1.5, 0, -2.5> } object { Light_Pawn translate <0.5, 0, 0.5> } // E5 object { Light_Pawn translate <3.6, -0.3, -5.52> } // captured object { Light_Pawn translate <-1.5, 0, -1.5> } // C3 object { Light_Pawn translate <-2.5, 0, -2.5> } object { Light_Pawn translate <-3.5, 0, -2.5> } object { Light_Knight rotate <0,110,0> translate <5.6, -0.3, -3.5> } // captured object { Light_Knight rotate <0,195,0> translate <1.5, 0, -1.5> } // F3 object { Light_Rook translate <-3.5, 0, -3.5> } object { Light_Rook translate <3.5, 0, -3.5> } object { Light_Bishop translate <-0.5, 0, -1.5> } // D3 object { Light_Bishop translate <0.5, 0, -1.5> } // E3 object { Light_Queen translate <-0.5, 0, -3.5> } object { Light_King translate <0.5, 0, -3.5> } */ #if (10) #if (10) object { Light_Rook translate <3.5, 0, -3.5> } #if (10) object { Light_Queen translate <-0.5, 0, -3.5> } object { Light_King translate <0.5, 0, -3.5> } //pawns object { Dark_Pawn translate <-0.5, 0, 0.5> } object { Dark_Pawn translate <0.5, 0, 1.5> } //object { Dark_Pawn translate <1.5, 0, 2.5> } object { Light_Pawn translate <3.6, -0.3, -5.52> } #end #end #if (10) object { Dark_Bishop translate <1, -0.3, -5.7> } object { Dark_Knight rotate <0,90,0> translate <2.5, 0, 1.5> } // G6 object { Light_Knight rotate <0,110,0> translate <5.6, -0.3, -3.5> } object { Light_Knight rotate <0,195,0> translate <1.5, 0, -1.5> } #end #end ///// board #macro board_sq(p) object { Round_Box_Union(<-1.01,-0.01,-1.01>, < 0.01,-.25,0.01>, .01) translate p } #end #macro boardlight() #local i=0;#local j=0; #while (i<8) #local j=0; #while (j<8) #if (mod(i+j,2)) board_sq(<-3+j,0,-3+i>) #end #local j=j+1; #end #local i=i+1; #end #end #macro boarddark() #local i=0;#local j=0; #while (i<8) #local j=0; #while (j<8) #if (!mod(i+j,2)) board_sq(<-3+j,0,-3+i>) #end #local j=j+1; #end #local i=i+1; #end #end union { boardlight() texture { lightwood } } union { boarddark() texture { darkwood } } #declare frame = union { difference { box { <-4.5, -0.02, -4.5>, < 4.5, -1, 4.5> } box { <-4.01, 1, -4.01>, < 4.01, -2, 4.01> } } box { <-4.8, -0.1, -4.8>, < 4.8, -2, 4.8> } } #declare frame1 = difference { object { frame } box { <-5, 1, -4>, < 5, -3, 5> } texture { darkwoodr } } merge { object { frame1 } object { frame1 rotate y*180 } object { frame1 rotate y*90 } object { frame1 rotate y*-90 } } ///// board