plane { <0, -1, 0>, 0 texture { pigment { color rgb <1, 1, 1> } finish { ambient rgb <0.454902, 0.454902, 0.454902> reflection { rgb <0.0196078, 0.0196078, 0.0196078> } } } scale 1 rotate <0, 0, 0> translate y*97 } plane { <0, 1, 0>, 0 texture { pigment { color rgb <1, 1, 1> } finish { ambient rgb <0.454902, 0.454902, 0.454902> reflection { rgb <0.0196078, 0.0196078, 0.0196078> } } } scale 1 rotate <0, 0, 0> translate <0, 0, 0> } //*PMRawBegin #declare Thickness = .75; #declare Height = 48; #declare Depth = 14; #declare Width = 24; #declare Shelves = 4; #declare FromGround = 42; #declare SpaceBetween = 32; //#declare BookHeight = seed(ceil(rand(SeedSeed)*100)+Time); #declare R1 = seed(12343); #declare R2 = seed(234); #declare R3 = seed(232); #declare _Red = rand(R1); #declare _Green = rand(R2); #declare _Blue = rand(R3); #declare BookShelf = union { // Backing box { <0, 0, Depth> } // Vertical Left box { <0,0,0> } // Horizontal Bottom box { <0,0,0> translate } // Vertical Right box { <0,0,0> translate } #declare Counter = 1; #while (Counter<=Shelves) // Horizontal Shelf box { <0,0,0> translate } // Books of varying heights, thickness, color #declare BookInches = Width; #declare Offset = 0; #while (BookInches>Thickness) box { pigment { color } translate <0, (Counter*Height/Shelves-Height/Shelves)-Offset, 0> } #declare Offset = Thickness; #declare BookInches = BookInches - (int(rand(R1)*2) + 1); #end #declare Counter=Counter+1; #end } union { object { BookShelf texture { pigment { color <1,1,1> } finish { ambient .5 reflection .1 } } translate <0, FromGround, 0> } object { BookShelf texture { pigment { color <1,1,1> } finish { ambient .5 reflection .1 } } translate <-Width-SpaceBetween, FromGround, 0> } translate } //*PMRawEnd box { <-50.5, 0, -0.5>, <50.5, 97, 0.5> texture { pigment { color rgb <0.988235, 1, 0.792157> } finish { ambient rgb <0.454902, 0.454902, 0.454902> reflection { rgb <0.0196078, 0.0196078, 0.0196078> } } } scale 1 rotate <0, 0, 0> translate z*14 hollow false } global_settings { adc_bailout 0.00392157 assumed_gamma 1.5 noise_generator 2 } light_source { <0, 90, -72>, rgb <1, 1, 1> spotlight radius 70 falloff 70 point_at <0, 0, 1> } light_source { <232.66, 90, -64.684>, rgb <1, 1, 1> parallel } camera { perspective location <0, 60, -120> sky <0, 1, 0> direction <0, 0, 1> right <1.3333, 0, 0> up <0, 1, 0> look_at <0, 48, 0> }