#version unofficial MegaPOV 0.3; #include "colors.inc" // Maze( M_Dim, M_Complex, M_Randseed ) // // M_Dim is the dimensions for the tile. '4' would let you place it on a // 4-unit square cube // // M_Complex is how complex you want it. Values range from 0 to 2. // good values are from 1 to 2 // // M_Randseed is just the seed value for the maze. Enter any value to // see different patterns #macro Maze( M_Dim, M_Complex, M_Randseed ) #local M_Dim=M_Dim*8; #local M_Rand=M_Dim/20; #local M_Pat= function{ pigment{ image_map{ pattern M_Dim, M_Dim{ function noise3d(x,y,z) scale( .25/M_Rand )/M_Complex translate y*rand( seed( M_Randseed ) ) } map_type 0 //include 'once' to test the tiling } translate<-.5, -.5, -.5> rotate x*90 scale M_Dim/4 } } #local M_Pigm= function{ pigment{ function M_Pat( x, y, z ) scale .5 pigment_map{ [.5 function x*2 sine_wave color_map{ [.5 rgb 0][.5 rgb 1] } ] [.5 function z*2 sine_wave color_map{ [.5 rgb 0][.5 rgb 1] } ] } } } function{ M_Pigm( x, y, z ) } #end #declare C = pigment { Maze( 12, 1.75, 13598 ) scale 1 } light_source { <0,0,-5> color rgb 1 } camera {orthographic location <0,0,-3> look_at <0,0,0> up <0,1,0> right <1,0,0> } box{<1,.1,1>,<-1,0,-1> pigment{C scale (1/12)} rotate <90,0,0>}