// POV-Ray 3.6/3.7 include file "Light_Sword_1.inc" // author: Friedrich A, Lohmueller, Oct-2008, May-2014 // homepage: http://www.f-lohmueller.de/ // email: Friedrich.Lohmueller_aT_t-online.de //------------------------------------------------------------------------ #ifndef( Light_Sword_1_Inc_Temp) #declare Light_Sword_1_Inc_Temp = version; #version 3.6; //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- #ifndef( Shapes_Inc_Temp) #include "shapes.inc" #end //------------------------------------------------------------------------------ ///////// // --------------------------------------------------------------------------------- // --------------------------------------------------------------------------------- #macro Light_Sword_1 ( Blade_Length, Handle_Len, Aura_R, // Center_R, // Handle_R, // Aura_Color, // Center_Color, // Shining_Color // ) // --------------------------------------------------------------------------------- #local D = 0.01; #local LS_Len = Blade_Length; // --------------------------------------------------------------------------------- #ifndef( Handle_Texture ) #declare Handle_Texture = texture{ pigment{ color rgb< 1, 1, 1>*0.15 } // color Gray15 normal { bumps 0.5 scale 0.05 } finish { phong 1 } } // end of texture #end // --------------------------------------------------------------------------------- // containers for media, using Merge_ON=1 #local Blade_Aura = object{ Round_Cylinder(<0,0,0>, <0,Blade_Length,0>,Aura_R+Center_R , Aura_R-D, 1) } // ------------------------------------------------------------------------ #local Blade_Center = // uses Merge_ON object{ Round_Cylinder(<0,0,0>, <0,Blade_Length-Aura_R,0>,Center_R ,Center_R-D, 1) } // ------------------------------------------------------------------------ // --------------------------------------------------------------------------------- union{ light_source{ <0, 0, 0> color rgb Shining_Color area_light <0, 0.1, 0> <0, 0.9, 0> // 1, 5 // } //------------------------------------ object{ Blade_Center pigment{ color rgbf<1,1,1,1>} //color Clear hollow interior{ media{ emission Center_Color }} } //------------------------------------------ object{ Blade_Aura pigment{ color rgbf<1,1,1,1>} //color Clear hollow interior{ media{ emission Aura_Color }} } //------------------------------------------ // Handle union{ object{ Round_Cylinder(<0,-Handle_Len,0>, <0,Center_R,0>,Handle_R ,Handle_R/3, 0)} torus{ Handle_R,Handle_R/4 translate<0,0,0> } texture{ Handle_Texture } } // end Handle translate<0,Handle_Len/2,0> } // end of union // -------------------------------------------------------------------------------------- #end// of macro ------------------------------------------------------// end of macro //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- // sample: /* //----------------------------------------------------------------------------- textures // ---------------------------------------------------------- #include "Light_Sword_1.inc" // ---------------------------------------------------------- object{ Light_Sword_1 ( 1.0, // Blade_Length, min: 0.08 0.15, // Handle_Len, 0.04, // Aura_R, 0.02, // Center_R, 0.025, // Handle_R, <1.0,0.3,0.8>*1.5, // Aura_Color, <1.0,0.1,0.5>*10 , // Center_Color, <0.5,0.0,0.3>*0.75 // Shining_Color ) // -------------------------------- scale<1,1,1> rotate< 10,0,-60> translate<-0.40,0.20,-0.10> } // end of object "Light_Sword_1" -------------------- // ---------------------------------------------------------- // ---------------------------------------------------------- //--------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------- */ #version Light_Sword_1_Inc_Temp; #end //------------------------------------------------------------------- end of include file