#version 3.8; global_settings {assumed_gamma 1.0} camera { location <0, -1, -15> look_at <0, 0, 0> right x*image_width/image_height up y } sky_sphere {pigment {rgb 1} } light_source {<10, 10, -10> rgb 1} /* f_polytubes(x,y,z, P0, P1, P2, P3, P4, P5): The Polytubes surface consists of a number of tubes. Each tube follows a 2d curve which is specified by a polynomial of degree 4 or less. If we look at the parameters, then this function generates P0 tubes which all follow the equation x = P1 + P2y + P3y2 + P4y3 + P5y4 arranged around the Y axis. This function needs a positive threshold (fatness of the tubes). P0 : Number of tubes P1 : Constant P2 : Y coefficient P3 : Y2 coefficient P4 : Y3 coefficient P5 : Y4 coefficient */ #include "functions.inc" isosurface { function { f_polytubes ( x,y,z, 1, -6, -5, 5, 5, 1 ) } contained_by {sphere {<0,0,0>, 8}} threshold 0.5 max_gradient 1100 accuracy 0.0001 texture { pigment{rgb <1,0.75,0.00>} //normal { bumps 0.15 scale 0.015} finish {specular 0.2 phong 0.7 } } rotate y*90 rotate z*90 } // end isosurface