#include "colors.inc" #include "stones.inc" #declare units_feet = 12; // perspective (default) camera #declare c_loc = < -4.5, 8.0, -4.0>; camera { location c_loc look_at <-4.5, 0.0, -2> } // create a regular point light source light_source { c_loc // light's position (translated below) color rgb <1,1,1> // light's color } #declare old_tile_tex = texture{ pigment{ color rgb <.9,.87,.8> } finish{ ambient 0 diffuse .9 reflection{ 0, .04 } specular .1 roughness .6 } normal{ average normal_map { [ .5 wrinkles .3 scale 20 ] [ .5 bumps .01 scale .3 ] [ .5 agate .13 turbulence .18 scale 6 ] } scale <3,1,1> } } #declare tile_tex = texture{ average texture_map{ [0.6 old_tile_tex ] [0.4 T_Stone1 scale 8 ] } } #declare grout_tex = texture{ pigment{ color rgb .8 } finish{ specular .2 roughness 5 ambient 0 diffuse .8 } } #declare floor_width = 3; #declare floor_depth = 3; #declare x_count = 0; #declare z_count = 0; #declare s1 = seed(2883); #declare tile_floor = union{ #while (x_count < floor_width ) #while (z_count < floor_depth ) superellipsoid { <.02,.1> rotate 90*x translate <-1,0,-1> scale <.5,.05,.5> scale units_feet translate <-x_count*units_feet,0,-z_count*units_feet> texture { tile_tex rotate rand(s1)*360*y } } #declare z_count = z_count+1; #end #declare z_count=0; #declare x_count=x_count+1; #end box{ <0,-.1,0> <-floor_width*units_feet,.565,-floor_depth*units_feet> texture{ grout_tex }} translate 6*z } object { tile_floor scale <0.25, 1, 0.25> }