//------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- #include "meshmaker.inc" //------------------------------------------------------------------------------------------------- #macro p_Lathe( Spline ) #local __S=function{spline{Spline}} Parametric( function(x,y){(__S(u).x * sin(v)/2)}, function(x,y){u}, function(x,y){(__S(u).x * cos(v)/2)}, <0,0>, <1,2*pi>, 20,20,"" ) #end //------------------------------------------------------------------------------------------------- #declare Spline_1 =spline { cubic_spline -1 , < 1, 0, 0>, 0 , < 1, 0, 0>, 0.3, < 0.2, 0, 0>, 0.7, < 0.2, 0, 0>, 1.0, < 1, 0, 0>, 2 , < 1, 0, 0> } //------------------------------------------------------------------------------------------------- object{ p_Lathe(Spline_1) // no_shadow texture { // inside texture uv_mapping pigment{ checker color rgb <0.5,0.0,0.1> rgb <1,1,1> scale <0.04,0.04,0.01>} finish { specular 0.5} } // interior_texture{ // outside texture uv_mapping pigment{ checker color rgb <0.0,0,0.0> rgb <1,0.9,0.9> scale <0.04,0.04,1>} finish { phong 0.5 } } // rotate<0,0,0> scale<1,1,1>*1.7 translate< 0, 0, 0 > } // end of object //--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------