//******************************************************************* // // Author : Michael Andrews ( M.C.Andrews@Reading.ac.uk ) // date : 4/12/1998 // // version : 2.0 // // macro : M_Iris // parameters : // MI_n : number of iris 'petals' // MI_s : radius of iris, oriented on (x,y) plane // MI_open : opening fraction - 0 is closed, 1 is open // MI_is_union : whether petals are unioned or merged // //******************************************************************* // Convex interior blade edges. #macro M_Iris ( MI_n, MI_s, MI_open, MI_is_union ) intersection { cylinder { -0.05*z, 0.05*z, 1 } #if (MI_is_union) union { #else merge { #end #local MI_c = 0; #while (MI_c < MI_n) cylinder { -0.01*z, 0.01*z, 1 rotate -3*y translate y rotate 60*z translate -y rotate -MI_open*MI_open*120*z translate y rotate 360*(MI_c/MI_n)*z } #local MI_c = MI_c + 1; #end } scale MI_s } #end // Concave interior blade edges. #macro M_Iris2 ( MI_n, MI_s, MI_open, MI_is_union ) intersection { cylinder { -0.05*z, 0.05*z, 1 } #if (MI_is_union) union { #else merge { #end #local MI_c = 0; #while (MI_c < MI_n) difference { box { <-1, -2, -0.01>, <2, 0, 0.01> } cylinder { -0.02*z, 0.02*z, 1 } rotate -2*y translate y rotate -60*z translate -y rotate -MI_open*60*z translate y rotate 360*(MI_c/MI_n)*z } #local MI_c = MI_c + 1; #end } scale MI_s } #end global_settings { assumed_gamma 1.0 } background { color rgb 0.6 } camera { location <0.0, 20.0, -50.0> direction <0.0, 0.0, 4> look_at <0.0, 0.0, 0.0> } light_source { 0*x colour rgb 1.0 translate <-2000, 4000, -2000> } // closed union { torus { 4, 0.2 rotate 90*x } M_Iris2(7, 4, 0.0, true) pigment { rgb <1, .9, .8> } finish { diffuse 0.5 specular 0.5 metallic } translate <-4, 1, 3> } // half way union { torus { 4, 0.2 rotate 90*x } M_Iris2(7, 4, 0.5, true) pigment { rgb <.9, .8, 1> } finish { diffuse 0.5 specular 0.5 metallic } } // open union { torus { 4, 0.2 rotate 90*x } M_Iris2(7, 4, 1.0, true) pigment { rgb <.8, 1, .9> } finish { diffuse 0.5 specular 0.5 metallic } translate <4, -1, -3> }