// ------------------------------------------------------ // scene for shortest code contest 4 // Created November 2006 // by Christoph Hormann // ------------------------------------------------------ // the function for the isosurface structure #local X= function { pattern { agate turbulence 1 octaves 12 } } // a simple scattering atmosphere media { scattering { 2, .02 } } // the surface shape isosurface { function { // negative sign turns inside out (could also use 'open' instead) -( // the base function: a modified cylinder sqrt(x*x+y*(y-z-x*1.6)*.9) -.05 // the main structure -X(z/.3,y-7e-3,-x)*.03 // additional small scale structure for large size renders -X(x*15,y*15,z*18)/1e3 // scale to avoid need for max_gradient )/50 } accuracy 1e-6 pigment { rgb .8 } scale 6 } // a point light to illuminate the whole thing light_source { 7+9*z <8,4,3> }