#include "ChessPieces.inc" #include "colors.inc" global_settings{ambient_light 5 max_trace_level 99} //#declare Shiny = finish {ambient .1 diffuse .1 specular 1 roughness .001 metallic reflection {.75 metallic} } //#declare Shiny = finish {brilliance 2.5 phong 1 reflection {0.5 metallic 0.8} ambient 0.005 diffuse 0.05 } #declare Shiny = finish {brilliance 2.5 phong 1 reflection {0.8 metallic 0.8} ambient 0.005 diffuse 0.05 } //#declare Shiny = finish{} #declare Gold = pigment{color BrightGold} #declare Silver = pigment{color rgb 1} #declare Ruby = pigment{ bozo turbulence 0.65 octaves 6 omega 0.7 lambda .2 color_map { [0 color rgb 0.4*x] [.5 color rgb x] [1 color rgb <1,0.6,0.6>] } scale .0065 } camera { location <-1, 1, -2> look_at .5*y angle 45 } light_source { <1, 2, -2> color rgb 2 parallel } //sky_sphere {pigment{color rgb <.5,.5,1>}} /*plane { y, 100 pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map {/ [0 color rgb <.5,.5,1>] [.25 color rgb <.5,.5,1>] [.75 color rgb 1] [1 color rgb 0.5] [0 color rgb 1] [.5 color rgb .5] [1 color rgb 1] } scale 50 } finish{ ambient 1 diffuse 0 } }*/ sky_sphere { pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0 color rgb <.5,.5,1>] [.25 color rgb <.5,.5,1>] [.75 color rgb 1] [1 color rgb 0.5] /* [0 color rgb 1] [.5 color rgb .5] [1 color rgb 1] */ } scale .5 } } object //pawn { Pawn2 pigment{Gold} finish{Shiny} } bicubic_patch //cape { type 0 flatness 0 u_steps 5 v_steps 5 /* < 0, 3,-0.4>, < 0, 3, 0>, <0, 3, 0>, <0, 3,-0.4>, <-1, 3,-1>, <-0.5, 4, 1>, <0.5, 4, 1>, <1, 3,-1>, <-2, 3, 2.5>, <-0.67, 1, 2.5>, <0.67, 0, 2.5>, <2, 1, 2.5>, <-2, .5, 4>, <-0.67, 1, 4>, <0.67, 1, 4>, <2, 2, 4>*/ < 0, 3,-0.4>, < 0, 3, 0>, <0, 3, 0>, <0, 3,-0.4>, <-1, 3,-1>, <-0.5, 4, 1>, <0.5, 4, 1>, <1, 3,-1>, <-1.5, 2, 1.5>, <-0.5, 1, 1.5>, <0.5, 0, 1.5>, <1.5, 1, 1.5>, <-2, .5, 2>, <-0.67, 1, 2>, <0.67, 1, 2>, <2, 2, 2> pigment {color rgb z} scale <-1,1,1>/4 // double_illuminate } union //brooch { torus { 1,.2 pigment {Silver} // finish {brilliance 2.5 phong 1 reflection {.5}} finish{Shiny} rotate 90*x } sphere { 0,1 scale <1,1,.25> pigment {Ruby scale 1/.03} finish {brilliance 2.5 phong 1} } scale .03 translate < 0, 2.95,-0.47>/4 } union //scepter { union { #declare Thick = 0.015; sphere { Thick*y, Thick } cylinder { Thick*y, .7*y, Thick } sphere_sweep { cubic_spline 6, < .4, 1.1,0>, Thick < .15, 1,0>, Thick < .075,.9,0>, Thick < .1,.8,0>, Thick < 0,.7,0>, Thick <-.1,.8,0>, Thick } sphere_sweep { cubic_spline 6, < .4, 1.1,0>, Thick < .15, 1,0>, Thick < .075,.9,0>, Thick < .1,.8,0>, Thick < 0,.7,0>, Thick <-.1,.8,0>, Thick rotate 120*y } sphere_sweep { cubic_spline 6, < .4, 1.1,0>, Thick < .15, 1,0>, Thick < .075,.9,0>, Thick < .1,.8,0>, Thick < 0,.7,0>, Thick <-.1,.8,0>, Thick rotate -120*y } torus { .1, Thick/2 translate .8*y } torus { .075, Thick/2 translate .9*y } pigment {Gold} finish {Shiny} rotate 60*y } //orb sphere { 0,1 scale .065 pigment {Ruby} /* { bozo turbulence 0.65 octaves 6 omega 0.7 lambda .2 color_map { [0 color rgb 0.8*x] [.4 color rgb x] [1 color rgb <1,0.6,0.6>] } scale .1 }*/ finish {brilliance 2.5 phong 1} // finish{Shiny} translate y*.81 } translate <-.8,0,-.5>/2 } /*union { //trim sphere_sweep { bezier_spline 4, < 0, 3,-0.5>, <-2, 3,-1>, <-2, 3, 2.5>, <-2, 1, 4>, } sphere_sweep { bezier_spline 4, < 0, 3,-0.5>, < 0, 3.5, 0>, <0, 3.5, 0>, <0, 3,-0.5>, } sphere_sweep { bezier_spline 4, <0, 3,-0.5>, <2, 3,-1>, <2, 1, 2.5>, <2, 2, 4> } pigment{Gold} finish{Shiny} }*/ plane { //board y, 0 texture { pigment { checker pigment {color rgb <1,1,0>*2/3} pigment {color rgb 2/3} } //finish {ambient .1 diffuse .1 specular 1 roughness .001 metallic reflection {.75 metallic} } //finish { reflection {0.8 metallic 1} ambient 0 diffuse 0.1 } //finish {brilliance 2.5 phong 1 reflection {1}} //finish {brilliance 2.5 phong 1 reflection {0.5 metallic 1} ambient 0} //finish {Shiny} //finish {ambient .1} translate <1,0,-1>/2 } } #declare S=seed(2); //pieces #declare xpos=-100; #while(xpos<=100) #declare ypos=-50; #while(ypos<=200) #if(rand(S)<1/30 & (xpos<-1|xpos>0|ypos<-2|ypos>0)) object{ #switch(rand(S)*7) #range(0,3) Pawn2 #break #range(3,4) Rook #break #range(4,5) Bishop #break #range(5,6) Knight #break #range(6,6.5) Queen #break #range(6.5,7) King #break #end #if(rand(S)>.5) // pigment{color rgb <1,1,0>*2/3} pigment {Gold} rotate y*90 #else // pigment{color rgb 4/9} pigment{Silver} rotate y*-90 #end // finish {brilliance 2.5 phong 1 reflection {0.5}} // finish {brilliance 2.5 phong 1 reflection {0.5 metallic 1} ambient 0} finish{Shiny} translate } #end #declare ypos=ypos+1; #end #declare xpos=xpos+1; #end