//------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- #declare Pigment_1 = pigment { marble turbulence <0.1,0,0> translate <-0.5,0,0> scale <0.025,1,1> rotate <0,0,90> warp {repeat 0.5*x flip x} warp {repeat 0.5*y flip y} colour_map { [0, rgbf <0.86,0.86,0.86,0.6>] //<0,0,0,0>] [1, rgbf <1,1,1,0.6>] } translate<0,0.5,0> } // end pigment #declare Marb= function { pigment { Pigment_1 } // end pigment } #declare R= function(u,v) { -Marb(u,v,0).gray *1.05 } //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- #declare a=0.3; #declare b=1; #declare c=0.2; #declare n=3; #declare F1= function(u,v){R(u,v)*((a*(1-v/(2*pi))*cos(n*v)*(1+cos(u))+c*cos(n*v)))} #declare F2= function(u,v){R(u,v)*((a*(1-v/(2*pi))*sin(n*v)*(1+cos(u))+c*sin(n*v)))} #declare F3= function(u,v){(b*v/(2*pi)+a*(1-v/(2*pi))*sin(u))} //------------------------------------------------------------------------------------------------- #include "meshmaker.inc" //------------------------------------------------------------------------------------------------- object{ // Parametric(Fx,Fy, Fz, , , Iter_U, Iter_V, FileName) Parametric( // Builds a parametric surface out of three given functions. // The uv_coordinates for texturing the surface come from the square <0,0> - <1,1>. F1, F2, F3, //three functions <0, 0>, <2*pi, ToV(2*pi)>,// range within to calculate surface: ,. 50,100, // resolution of the mesh in the u range and v range. "" // FileName: ""= non, "NAME.obj'= Wavefront objectfile, "NAME.pcm" compressed mesh file // "NAME.arr" = include file with arrays to build a mesh2 from, // others: includefile with a mesh2 object ) //--------------------------------------------------------------------------------------------- // no_shadow texture { // inside texture uv_mapping pigment{ color rgb <1,0.8,0.8> } // pigment{ checker color rgb <0.5,0.0,0.1> rgb <1,1,1> scale <0.025,0.0035,0.01>} finish { specular 0.15} } // interior_texture{ // outside texture // uv_mapping pigment{ color rgb<1,1,1>} //0.9, 0.85, 0.75>*0.95} //normal { bumps 0.25 scale 0.0025 } finish { phong 0.5} /* uv_mapping pigment{ checker color rgb <0.0,0,0.0> rgb <1,0.9,0.9> scale <0.05,0.0065,1>} finish { phong 0.5 } */ } // rotate<-90,0,0> scale<-1,1,1>*1.9 translate< 0, 0, 0 > } // end of object //--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------