// (C) 2004 by Rafal Maj Raf256 http://www.raf256.com/3d/pov/ // "Borg CUbe (II)" A-00121 // http://www.raf256.com/3d/image/a00123 #macro M(N,C) // macro for generating complicated texture N=recursion depth C=color #if(N>0) // if not too deep. N is an real, not integer number. pigment { checker // checker of two textures M(N-sin(N)C) // resursion - generate child texture. sin(N) is working as rand() M(N-.7C) // same as above. M(N-.7C) is a shortcut for M(N-.7,C) seems that Pov 3.6 doesnt need colon ',' scale .6 } #else pigment { // at deepest step of recursion cells // cells texture color_map { [.5 rgbt 0.5*C + 0.3] // transparent hole [1 rgb C] // real color } } #end #end union { // borg ship box{1,-1M(2.6,1)} // outer hole box{-.9.9M(2y)} // inner hole (green) rotate 30 translate z*4 // move away from camera } light_source{-5 rgb 3 area_light x,y,9,9} cone { -z*9, 9 z*99, 9 M(1z) } // tunel, good we have texture M(...) ready to use. M(1z) = M(1,z) = M(1,blue)