// Adapted from original function for power 8 by Paul Nylander at http://www.bugman123.com; // #version 3.7; global_settings { assumed_gamma 2.2 } // No inc-files else Povray crashes! // Mandelbulb - power 3 #declare n=3; #declare f=function(i,x,y,z,xc,yc,zc) {select(i>0 & x*x+y*y+z*z<4, 0, sqrt(x*x+y*y+z*z), f(i-1,(pow(x,n)+pow(y,n)+pow(z,n))*cos(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+xc, (pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+yc, -(pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(z,sqrt(x*x+y*y)))+zc,xc,yc,zc))}; isosurface{ function{f(24,0,0,0,x,y,z)} threshold 2 max_gradient 1000 // found by Povray: 63234 contained_by{sphere{0,1.5}} pigment{rgb 1} } // Mandelbulb - power 5 /* #declare n=5; #declare f=function(i,x,y,z,xc,yc,zc) {select(i>0 & x*x+y*y+z*z<4, 0, sqrt(x*x+y*y+z*z), f(i-1,(pow(x,n)+pow(y,n)+pow(z,n))*cos(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+xc, (pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+yc, -(pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(z,sqrt(x*x+y*y)))+zc,xc,yc,zc))}; isosurface{ function{f(24,0,0,0,x,y,z)} threshold 2 max_gradient 1000 // found by Povray: 63234 contained_by{sphere{0,1.5}} pigment{rgb 1} } */ // Mandelbulb - power 7 /* #declare n=7; #declare f=function(i,x,y,z,xc,yc,zc) {select(i>0 & x*x+y*y+z*z<4, 0, sqrt(x*x+y*y+z*z), f(i-1,(pow(x,n)+pow(y,n)+pow(z,n))*cos(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+xc, (pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+yc, -(pow(x,n)+pow(y,n)+pow(z,n))*sin(n*atan2(z,sqrt(x*x+y*y)))+zc,xc,yc,zc))}; isosurface{ function{f(24,0,0,0,x,y,z)} threshold 2 max_gradient 1000 // found by Povray: 249128 contained_by{sphere{0,1.5}} pigment{rgb 1} } */ background { color rgb<0,0,0> } camera{ location <1.75,4,-5.5> look_at <0.0, 0.0, 0.0> up y sky y angle 40 } light_source{<-20.00, 30.00, -20.00> color rgb < 1.0, 0.498039, 0.0 >} // color Coral light_source{<20.00, -30.00, 0.00> color rgb < 0.847059, 0.847059, 0.74902 >} // color Wheat