#version unofficial MegaPOV 0.3; #include "colors.inc" // Major radius. #declare R0 = 0.9; // Minor radius. #declare R1 = 0.4; // Efficient bounding box for torus. #declare BOXL = < -(R0+R1), -R1, -(R0+R1)>; #declare BOXH = <(R0+R1), R1, (R0+R1)>; // Displacement ammount. #declare H = 0.05; // Torus function. #declare T = function { "torus", } // "Displacement-map" pigment function. #declare D = function { pigment { image_map{sys "maze_dnt.bmp" interpolate 2} warp { toroidal orientation z dist_exp 0.0 major_radius R0 } } } // Light! light_source { <1,1,-1>*R0*4 1 } light_source { <0,0,0> <.5,.5,1>} // Camera! camera { location -z*R0*4 look_at 0 } // Action! isosurface { function { T(x,y,z) + H -2*D(x,y,z)*H } contained_by { box { BOXL,BOXH } } eval pigment { color rgb 1 } finish {ambient .4} rotate x*90 }