#version 3.1; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- light_source { <0, 3000, 0> color rgb 1 } #declare N = 50; #include "ground.inc" #declare tWhite = texture{ pigment { colour rgb 1 } finish { ambient 0.7 } } #declare tBlack = texture{ pigment { colour rgb 0 } finish { ambient 0.2 } } noise(0.0025) /* 0.25 % noise. a good value is in the range of 0.05% -> 1%, but it also depends on the amount of control points used. (more points, higher noise) and how large the grid is(larger grid and the noise can be upped with .5% or so. This will overwrite the data in the world. not nice, but it will FORCE the array to initzialize, and it will give you the advantage of not having to parse a big array one time to many. */ /* Vector is the position of the center of the change. only X and Z are relevant and allowed. Positive fMax causes a hill at the position, negative a hole The fMax(last parameter) can bee seen as a parameter of how much the change will affect the final world */ change_lin(<1/2, 0, 1/2>, -0.50) //Center hole change_lin(<1/1, 0, 1/1>, -0.25) //A hole at the top right corner. change_log(<08/32, 0, 23/32>, 0.50) //A "hill" (spike) to the left and a bit in. change_lin(<11/32, 0, 26/32>, -0.5) //A lowering to the left and a bit in. change_log(<14/32, 0, 28/32>, 0.40) //A even lower hill to the left and a bit in. change_log(<2/5, 0, 1/5>, -0.25 ) //A hole close to center and towards the viewer, finalize() //create the camera before the world. or you'll be in trouble, since the world creation destroys the array. MakeCam(<4/5,0, 0>, <1/5,0,4/5>) OutMesh() //Create a mesh of it. //The default colouring is a gradient in y. //OutBoxes(tWhite, tBlack) //create a box union from -0.0001 to 1 //Will default use a BW checker style. Slow parser, perhaps, but good effect. #debug "rendering \n" #statistics concat("There are ",str(triangles,-3,0)," triangles in the scene.\n")