/********************************************************************************** Persistence of Vision Ray Tracer Scene Description File File name : TdG_Parquet_mcr.pov Version : 3.6 / MegaPOV 1.1 Description : A wooden parket, inspired by the Moray plugin parkett.lua by Severin Dietschi Date : 2005 Author : Thomas A. M. de Groot E-mail : Copyright (C) 2005. All rights reserved. Use and/or modification of this scene is free, except for commercial purposes. Commercial distribution is not allowed without written permission from the author. **********************************************************************************/ // true for testing, otherwise set to false in main script before including this file #ifndef (Standalone) #declare Standalone = true; #end //==================================================================================== // Start of the macro: // ------------------ #macro Parquet() #include "rand.inc" #include "math.inc" #ifndef (P_length) #local P_length = 7; #end #ifndef (P_width) #local P_width = 7; #end #local P_seed = 123549; #local P_rand = seed(P_seed); #local P_tile = 0; #local P_rot = 0; #local P_element = // origin of the element is lower left top corner union { box { <0.0025, 0.00, 0.0025>, <0.1975, -0.05, 0.9975> } box { <0.0000,-0.05, 0.0000>, <0.2000, -0.10, 1.0000> } } #ifndef (P_tex) #local P_tex = // S_Wood1_Parquet texture { pigment { wood color_map { [ 0.0 rgbft <0.855556, 0.501111, 0.134444, 0.0, 0.0> ] [ 0.1 rgbft <0.509877, 0.298642, 0.080123, 0.0, 0.0> ] [ 0.9 rgbft <0.3, 0.2, 0.1, 0.0, 0.0> ] [ 1.0 rgbft <0.3, 0.2, 0.1, 0.0, 0.0> ] } turbulence 0.09 octaves 3 ramp_wave scale <0.03, 0.03, 0.7> rotate <-90, 0.0, 0.0> } normal { wood , 0.2 turbulence 0.09 octaves 3 ramp_wave scale <0.03, 0.03, 0.7> rotate <-90, 0.0, 0.0> } finish { ambient 0.01 phong_size 16.0 specular 0.4 roughness 0.01 } scale 0.8 rotate 90*x } #end #local Originx = 0; #local Originz = 0; union { #while (Originx < P_length) #while (Originz < P_width) #local Tile = union { #while (P_tile < 1) object {P_element translate texture {P_tex translate RRand(-1, 1, P_rand)} } #local P_tile = P_tile + 0.2; #end //end of P_tile } object {Tile translate <-0.5, 0, -0.5> rotate P_rot * y translate <0.5, 0, 0.5> translate } #if (P_rot = 0) #local P_rot = 90; #else #local P_rot = 0; #end #local P_tile = 0; #local Originz = Originz + 1; #end //end of Originz #local Originz = 0; #local Originx = Originx + 1; #local N = even(Originx); #if ( N = true ) #local P_rot = 0; #else #local P_rot = 90; #end #end //end of Originx } //end of union #end //end of macro //======================================================================================================================================= #if (Standalone) #version 3.6; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- #declare P_width = 8; #declare P_length = 8; // The surface of Parquet() is at y=0; the origin at x=0 and z=0 object { Parquet() translate <-(P_width/2), 0, -(P_length/2)> rotate 60*y translate } // ---------------------------------------- #declare Distance = 1; camera { location direction 1.5*z right x*image_width/image_height look_at } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-10, 30, 30> } // ---------------------------------------- plane { y, -0.1 texture { pigment { color rgb <0.7,0.5,0.3> } } } #end // end of Standalone