#default { finish { ambient 0.4 } } camera { up <0, 1, 0> right <1, 0, 0> location <-4,3,-16> look_at <0,0,0> angle 20 } #include "colors.inc" #declare greenpaint = texture { pigment { color rgb <0 1 0> } finish { specular 0 reflection 0 diffuse 0.7 } } #declare offwhitepaint = texture { pigment { color rgb <0.9 0.9 0.8> } finish { specular 0 reflection 0 diffuse 0.7 } } #declare blackrubber = texture { pigment { color rgb <0.2 0.2 0.2> } finish { specular 0 reflection 0 diffuse 0.7 } } #declare blackplastic = texture { pigment { color rgb <0.2 0.2 0.2> } finish { specular 0.4 reflection 0 diffuse 0.5 } } background { color Black } light_source { <10,10,-10> color rgb <1,1,1> } //H_streaks and V_streaks are used to make natural looking fiber streaks //for the fabric //#declare H_streaks = pigment { bozo color_map { [0.0 color rgb <0.6,0.5,0.4>] [1.0 color rgb <0.8,0.7,0.6>] } scale <2,0.05,1> } //#declare V_streaks = pigment { bozo color_map { [0.0 color rgb <0.6,0.5,0.4>] [1.0 color rgb <0.8,0.7,0.6>] } scale <0.05,2,1> } #declare H_streaks = pigment { bozo color_map { [0.2 color rgb <0.4,0.3,0.2>] [0.8 color rgb <0.9,0.8,0.7>] } scale <10,0.1,1> } #declare V_streaks = pigment { bozo color_map { [0.2 color rgb <0.4,0.3,0.2>] [0.8 color rgb <0.9,0.8,0.7>] } scale <0.1,10,1> } //A fabric bump map is used to shade the surface (see fabricbumps.pov) //Then, a checkerboard is overlayed using alternating patterns of H_streaks //and V_streaks. The checker pattern and the bump map //are scaled together so that the streaks line up with the fiber bumps. #declare fabric = texture { pigment { checker pigment { H_streaks } pigment { V_streaks } scale 0.5*0.17 } normal { bump_map { gif "../images/fabricbumps.gif" bump_size 10 } scale 0.17 } finish { diffuse 0.8 specular 0.2 } } box { <-15,-1,5> <15,15,5> texture { fabric } } box { <-15,0,-15> <15,-1,15> texture { fabric rotate 90*x } }