// POV-Ray 3.6/3.7 include file "Star_1.inc" // author: Friedrich A, Lohmueller, Aug-2009 // homepage: http://www.f-lohmueller.de/ // email: Friedrich.Lohmueller_aT_t-online.de //------------------------------------------------------------------------ #ifndef( Star_1_Inc_Temp) #declare Star_1_Inc_Temp = version; #version 3.6; //------------------------------------------------------------------------ //---------------------------------------------------------- ////////////// #macro Star_1 ( Number_of_Rays ) //---------------------------------------------------------- ////////////// #local Ray_Profile = box { <-1,-1,-1>,< 1,1,1> scale <1,1,1>*sqrt(2) rotate<0,0,45> scale <1,0.36,1> rotate< 45,0,0> } // end of box --------------------------------------- #local Ray = intersection{ object{ Ray_Profile } object{ Ray_Profile scale<1,1,-1>} box{ <-2,-1,-1>,<0,1,1> inverse }// end of box scale<1,0.5,0.5> }// end of intersection //---------------------------------------------------------- union{ #local Nr = 0; // start #local EndNr = Number_of_Rays; // end #while (Nr< EndNr) object{Ray rotate<0,Nr * 360/EndNr,0>} #local Nr = Nr + 1;// next Nr #end // ----------------- // end of loop rotate<90,0,90> translate<0,0,0>} // end of union #end //--------------------------------------- end of macro ////////////// //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- // sample: /* //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- #include "Star_1.inc" //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- object{ Star_1 ( 8 ) // Number_of_Rays, ) scale 0.5 texture { pigment{ color rgb<1,0.76,0.25>} normal { crackle 1.0 scale 0.05 turbulence 0.5} finish { phong 0.5 reflection 0.2} } // end of texture rotate<0,0,0> translate<0,1,0> } // end of union //-------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- */ #version Star_1_Inc_Temp; #end //------------------------------------- end of include file