// POV-Ray 3.6 / 3.7 include file "Air_Mattress_01.inc" // author: Friedrich A, Lohmueller, Nov-2006 / May-2014 // homepage: www.f-lohmueller.de/ //------------------------------------------------------------------------ #ifndef( Air_Mattress_01_Inc_Temp) #declare Air_Mattress_01_Inc_Temp = version; #version 3.6; //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- #ifndef( Shapes_Inc_Temp) #include "shapes.inc" #end //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //------------------------------------------------------------------------------ ///////// #declare Air_Mattress_01 = union{ #local LB_ = 0.015; // linear elements #local Nr = 0; // start #local EndNr = 6; // end #while (Nr< EndNr) //Strength union{ cylinder{< 0.00, 0.00, 0.00>,< 0.00, 0.00, 1.25>, 0.050 } sphere {<0,0,0>, 0.050 translate< 0.00, 0.00, 1.25>} sphere {<0,0,0>, 0.050 } scale<1,0.8,1> translate} #local Nr = Nr + 1; // next Nr #end // --------------- end of loop intersection{ object { // Round_Box(A, B, WireRadius, UseMerge) Round_Box(<-LB_-0.05,-0.10,-0.055-LB_>,<0.10*5.5+LB_,0.10,1.30+0.05+LB_>, 0.050+LB_ , 0) scale<1,1,1> rotate<0, 0,0> translate<0,0.0,0> } // --------------------------------------------------------------------------------------- box{ <-LB_-0.050,-0.001,-0.050-LB_>,<0.10*5.5+LB_,0.000,1.30+0.050+LB_> } } //--------------------------------------------------------------------- // head elements union{ cylinder{< 0.00, 0.00, 0.00>,< (0.550-0.125/2)*2, 0.00, 0.00>, 0.125 } sphere {<0,0,0>, 0.125 translate< (0.550-0.125/2)*2, 0, 0>} sphere {<0,0,0>, 0.125 } intersection{ object { // Round_Box(A, B, WireRadius, UseMerge) Round_Box(<-LB_-0.125,-0.15,-0.125-LB_>,<(0.62-0.125/2)*2+LB_,0.15,+0.125+LB_>, 0.125+LB_ , 0) scale<1,1,1> rotate<0, 0,0> translate<0,0.0,0> } // ----------------------------------------------------------------- box{ <-LB_-0.135,-0.001,-0.125-LB_>,<(0.62-0.125/2)*2+LB_,0.005,0.125+LB_> } } //--------------------------------------------------------------------------- scale<0.5,0.45,1> translate<0,0,1.30+0.125> }// end sub union rotate<0,-90,0> translate<1.55,0,0.05> } // end of union ---------------------------------------------------- end of object //------------------------------------------------------------------------- //------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- // sample: /* //--------------------------------------------------------------- texture #local Air_Mattress_Texture = texture{ pigment{ color rgb<1,0.55,0.05>*1.1 } normal { bumps 0.15 scale 0.125} finish { phong 0.1}} //--------------------------------------------------------------- // #include "Air_Mattress_01.inc" //--------------------------------------------------------------- object{ Air_Mattress_01 texture{ Air_Mattress_Texture } scale<1,1,1> rotate<0, 0,0> translate<0,0.01,0> } //------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- */ #version Air_Mattress_01_Inc_Temp; #end //------------------------------------- end of include file