#include "kolors.inc" #include "rand.inc" #include "math.inc" #include "woods.inc" #include "transforms.inc" #include "spraycan.inc" #version 3.7; global_settings { assumed_gamma 1.0 } light_source { 0*x rgb 1 translate <100, 500, -300> } camera { perspective location <0.25, 4.25, -1.875> up y right x*(image_width/image_height) look_at <0.0, 4.0, 0.0> } #declare ft = 12; #declare dP = pigment { image_map { jpeg "aperture_science_logo_800.jpg" map_type 0 interpolate 4 once } translate <-0.5, -0.5, 0.0> scale 0.5 translate 4.0*y } #declare P_OldWood = pigment { wood turbulence <0.3, 0.1, 0.5> color_map { M_Wood1A } scale <0.125*ft, 1.0, 1.0*ft> } #declare F_OldWood = function { pattern { wood turbulence <0.3, 0.1, 0.5> scale <0.125*ft, 1.0, 1.0*ft> } } #macro Board(W, T, L) #local grain_seed = 15643544181; #local _X = Rand_Normal(0.0, 1.0, RdmA)*2e5; #local _Y = Rand_Normal(0.0, 1.0, RdmB)*2e5; #local _Z = Rand_Normal(0.0, 1.0, RdmC)*2e5; isosurface { function { f_rounded_box(x,y,z,0.125, W/2-0.03125*F_OldWood(x-_X,y-_Y,z-_Z), T/2-0.078125*F_OldWood(x-_X,y-_Y,z-_Z), L/2+0.25) } threshold 0 max_gradient 2 contained_by { box { <-W/2, -T/2, -L/2> } } all_intersections pigment { P_OldWood translate <_X,_Y,_Z> } finish { ambient 0 diffuse 0.38 specular 0.07 roughness 0.3 } } #end plane { y, 0 pigment { checker color White, color rgb <0.078125, 0.375, 0.75> } } #declare Env = object { Board(12, 2, 30) scale 1/12 rotate <-90, 0.0, -90> translate 4.0*y } //cylinder { -3.5*y, 4.5*y, 0.5 pigment { White } } #declare tSpline = spline { linear_spline #local a = 0.0; #while(a <= 1) a, <0.375*cosd(a*360), 4.0+0.375*sind(a*360), 0.0>, #local a = a + 0.025; #end } #declare eSpline = spline { linear_spline #local a = 0.0; #while(a <= 1) a, <0.375*cosd(a*360), 4.0+0.375*sind(a*360), -1.0>, #local a = a + 0.025; #end } union { object { Env } object { SprayCan(Env, 0, "", eSpline, tSpline, 20000, 30, 30) pigment { Black } finish { diffuse 0.03 specular 0.07 roughness 0.1 } } rotate 0.0*y }