POV-Ray : Newsgroups : povray.text.scene-files : LS_ObiWan Server Time
5 Jul 2024 09:51:27 EDT (-0400)
  LS_ObiWan (Message 1 to 1 of 1)  
From: Phil Clute
Subject: LS_ObiWan
Date: 30 Nov 2000 14:48:39
Message: <3A26AEF9.A043F37D@tiac.net>
You may need to adjust some lines due to word wrapping.

----------------------------------------------------------------------



// Persistence of Vision Ray Tracer Scene Description File
// File: LS_ObiWan.pov
// Vers: 3.1
// Desc: Obi-Wan Kenobi's Lightsabre from Star Wars 
// Date: April 13,1999
// Auth: Phil Clute    pcl### [at] tiacnet
// Design: The original Obi-Wan Kenobi lightsabre design belongs of
course to LUCAS FILM.Ltd
// Measurement: 1 pov unit = 1 meter



//--------------------------Fun Starts here----------------------------
#version 3.1;
#include "colors.inc"
#include "glass.inc"
global_settings{
        assumed_gamma 1.0
} 
// ----------------------------------------
 /*
camera        //------Just the Handle view--------
{
  location  <0.0161016, 0.12, -0.38>
  right     <0.5,0,0>          // render at +w120 +l240 or correct the
right to <1,0,0>
  look_at   <0.0, 0.1, 0.0>    // look_at z=0.12 -->usually
  angle 19
}
 */ 
camera{       //--------Handle and Blade view-----                  
        location<0.0,0.49,-10>
        right   <0.25,0,0>      //for +w120 +h480 image size
        look_at <0.0,0.49,0.0>
        angle 1.5
} 
 
light_source{0*x rgb <1.0,1.0,1.0> translate<-30,40,-100>*2 }
light_source{0*x rgb <1.0,0.8,0.4> translate<120,20,-60> }
light_source{0*x rgb <1.0,0.8,0.8> translate<600,100,-10>}
box{<-4,-4,.1><6,6,0.022> pigment
{/*White*/rgb<.09,.05,0.05>}finish{ambient .2}}
//plane{ z,100 pigment {rgb<.09,.05,0.05>}finish{ambient .2}}
sky_sphere
{ 
  pigment
  { 
    //agate 
    wrinkles
    color_map { [0.5 color rgb<.075,.2,1>] [1.0 color rgb 1] }
    turbulence 99
    scale 200
    rotate z*-40
  }
 /* pigment{Shadow_Clouds} */
}

plane { y, -2 
  texture
  {
    pigment {checker color rgb 1*1.5 color rgb 0*2 scale 1.5}
    finish {reflection 0.02 ambient .05}
  }
}
union{
//---------------------Textures--------------------------------------
#declare Black_Chrome = 
        texture{                
                pigment{color rgb <0.0,0.0,0.0>}
                finish {
                        ambient 0.01
                        brilliance .3
                        metallic 0.4
                        diffuse 0.3
                        specular 2.5
                        roughness 0.0125
                        reflection 0.0075
                }
       }
#declare LS_Chrome =
        texture{
                pigment{ color rgb <0.04,0.04,0.04>}
                finish {
                   ambient 0.24
                   brilliance 2.6
                   diffuse 2.5
                   specular 2.5
                   roughness 0.0175
                   reflection 0.675
                   reflection_exponent 0.95
                }
        }
 
//-------------------------TOP---------------------------------------

#declare TOP = object{ union{
//-----------------------Center Piece(Inner)------------------------- 
cylinder {<0,.23,0>,
          <0,0.11,0>,
          .0075
          texture{Black_Chrome}
} 
//-----------------------Center Piece(Outer)-------------------------
cylinder {<0,.17,0>,
          <0,0.03,0>,
          .013
          texture{Black_Chrome} 
}
//------------------------Center Piece(under shaft piece)------------
cylinder {<0,.2075,0>,
          <0,0.19,0>,
          .0099
          texture{Black_Chrome}
} 
//-----------------------Basket--------------------------------------

union{
cylinder {<0,.23,0>,               //--------Basket(center)-------
          <0,0.21,0>,
          .0099
}
cylinder {<0,.225,0>,              //--------Basket(Inner)--------
          <0,0.214,0>,
          .0125
}
superellipsoid{ <1,.15>             //---------Basket Casing-------
                scale<0.016,0.016,0.0099>
                rotate <90,40,0>
                translate<0,.2275,0>
}
superellipsoid{ <1,.2>             //---------Basket Rim(Inner)---
                scale<0.01755,0.01755,0.00275>
                rotate <90,40,0>
                translate<0,.2355,0>
}
superellipsoid{ <1,.3>            //----------Basket Rim----------
                scale<0.0215,0.0215,0.001>
                rotate <90,40,0>
                translate<0,.2375,0>
}
texture{LS_Chrome}
}//---End of Basket union 
}//---End of union (TOP)
}//---End of object TOP
//------------------------Beam Hole----------------------------------
difference{
        object{TOP}
        cylinder{<0,0.25,0>,
                 <0,0.225,0>,
                 0.01
        texture{Black_Chrome}
        }        
}


//------------------------Shaft Piece--------------------------------
union{
        cylinder{<0,.197,0>,
                 <0,.195,0>,
                 .0165
        }
        cylinder {<0,.203,0>,
                  <0,0.195,0>,
                  .015
        }
        pigment{Black}
        finish{
                ambient 0.01
                brilliance 0.3
                specular 0.45
                roughness 0.01
        }
}
//------------------------Hand Grip Cap------------------------------
cone {<0,.1735,0>,.012
      <0,.168>,.015
      pigment{Black}
      finish{
             ambient 0.01
             brilliance 0.3
             specular 0.45
             roughness 0.01
      }    
}   
//------------------------Hand Grip Rings----------------------------
 
#declare RX = 0;
#declare RY = 0.11;
#while (RX < 9) 
difference{          
        superellipsoid{<1,.4>
                       scale<0.015,0.015,.00275>
                       rotate x*90
                       translate<0,RY,0>
        }
        box { <-0.00125,.2,.25>,<0.00125,0,-.25>}
        box { <-0.00125,.2,.25>,<0.00125,0,-.25>rotate y*36}
        box { <-0.00125,.2,.25>,<0.00125,0,-.25>rotate y*72}
        box { <-0.00125,.2,.25>,<0.00125,0,-.25>rotate y*108}
        box { <-0.00125,.2,.25>,<0.00125,0,-.25>rotate y*144}
        texture{Black_Chrome}
}
#declare RX = RX + 1;
#declare RY = RY + 0.00665;
#end   
//----------------------Chrome Section (w/on switch)-----------------
union{
union{
cylinder {<0,0.1075,0>, 
          <0,0.065,0>,
          .015
}
box{<-0.005,0.1075,0.01><0.005,0.065,-0.018>}
box{<-0.005,0.1075,0.01><-0.0035,0.065,-0.02>}
box{<0.0035,0.1075,0.01><0.005,0.065,-0.02>}
#declare Pin = object{  union{
difference{ 
        cylinder {<0.00225,.0015,0>      
                <0.00225,-0.01975,0>,.0015
        } 
        sphere{<-0.00405,-0.01975,0.0>,.0075 
        }
        box{<0.001175,-0.02,-0.00154><-0.0007,0.0016,0.01>
        }
}
difference{
        superellipsoid{ <1,0.0001>
                        scale<0.0035,0.0015,0.0015>
                        rotate <0,0,0>
                        translate<0.00225,0.0,0>
        }
        box{<0.00225,0.0016,0.00155><0.01,-0.0016,-0.00155>}
}
cylinder{<0,0.0,0.005>,
         <0,0.0,-0.001501>,
         0.00045
         texture{Black_Chrome}
}
}//end Pin union
}//end Pin object
object {Pin
        rotate z*-10
        translate<0.0095,0.08625,-0.015175>        
}
texture {LS_Chrome}
}

superellipsoid {<1,.15>                 //top knob1
                scale<0.0035,0.0035,0.0012>
                translate <0,0.075625,-0.017>
                rotate y*53
                texture{LS_Chrome}
}
superellipsoid {<1,.15>                 //bottom knob1
                scale<0.00525,0.00525,0.0002>
                translate <0,0.075625,-0.016>
                rotate y*53
                texture{LS_Chrome}
}
superellipsoid {<1,.15>                 //single knob2
                scale<0.003,0.003,0.005>
                translate <0,0.096875,-0.0175>
                rotate y*50
                texture{LS_Chrome}
}
sphere { <0,0,0>, 0.0035            //top glass  (activation matrix)
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.102,-0.018>
}
sphere { <0,0,0>, 0.0035
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.09675,-0.018>
}
sphere { <0,0,0>, 0.0035
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.0915,-0.018>
}
sphere { <0,0,0>, 0.0035            //middle glass
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.08625,-0.018>
}
sphere { <0,0,0>, 0.0035
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.081,-0.018>
}
sphere { <0,0,0>, 0.0035
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.07575,-0.018>
}
sphere { <0,0,0>, 0.0035
         scale <1,0.75,1>
         texture{T_Glass4}
         translate<0,0.0705,-0.018>
}

rotate y*345
}   
//-----------------------Hand Grip (Bottom)--------------------------

#declare GX = 0;
#declare GR = 0;
#while (GX < 20)
    union{
        cylinder {<0,.065,0>,
                  <0,0.03,0>,
                  0.01475
        }
        superellipsoid{ <.1,.1>
                scale<.0007,.0175,.017>
                rotate y*GR
                translate<0,.0475,0>
        }
        texture{Black_Chrome}
    }
#declare GX = GX + 1;
#declare GR = GR + 18;
#end  
//-----------------------Power Cell----------------------------------
union{
cylinder{       <0,0.03,0>,
                <0,0,0>,
                0.013
}
superellipsoid{ <1,.2>                 //top ring
                scale<0.015,0.015,0.002>
                rotate x*90
                translate<0,0.028,0>
}
superellipsoid{ <1,.2>                //middle ring
                scale<0.015,0.015,0.011>
                rotate x*90
                translate<0,0.015,0>
}
superellipsoid{ <1,.2>                 //bottom ring
                scale<0.015,0.015,0.002>
                rotate x*90
                translate<0,0.002,0>
}   
//------------------Power Cell Knobies-------------------------------
#declare KR =0;
#declare KC =0;
#while (KC < 8)
        difference{             
                box{<-0.004,0.005,0.01><0.004,0.025,-0.017>}
                box{<-0.00501,0.0,-0.01><0.00501,0.01,0.02>  //top
cut               
                        rotate x*315
                        translate <0.0,0.017,-0.02>
                }
                box{<-0.00501,-0.01,0.02><0.00501,0.0,-0.01>  //bottom
cut
                        rotate x*45
                        translate <0,0.013,-0.02>
                } 
                rotate y*KR 
        }
#declare KR = KR + 45;
#declare KC = KC + 1;        
#end
texture {LS_Chrome}
}//End union(Power cell)    
torus{  0.008, 0.00095          //Belt-ring
        translate<0,0.021,-0.0125>
        rotate <330,45,0>        
        texture{LS_Chrome}
}
}//End LS_ObiWan object



//-----------------------Blade---------------------------------------

#declare Outer = media {              
      intervals 2
      samples 1, 2
      confidence 0.9
      variance 1/1000
      emission rgb<0,1,1>
      density {
                radial                    
                turbulence 0.0009
                color_map {
                        [0.0 color rgb <0, 1, 1>]
                        [0.2 color rgb <0, 1, .9>*15]
                        [0.5 color rgb <0, 1, 1>]
                        [1.0 color rgb <0, 1, 1>]
                }
      }
}  
#declare Middle = media {
      intervals 2
      samples 1, 20
      confidence 0.9
      variance 1/1000
      absorption <1,0,0>
      density {
                radial
                turbulence 0.0009
                color_map {

                        [0.0 color rgb <1, 0, 0>]
                        [0.2 color rgb <1, 1-0.15, 1-0.9>*15]
                        [0.5 color rgb <1, 0, 0>]
                        [1.0 color rgb <1, 0, 0>]
                }
      }
}      
#declare Inner = media {  
        intervals 2
        samples 1,2
        confidence 0.9
        variance 1/1000
        emission rgb<1,1,1>
        density {
                radial 
                turbulence 0.0009
                color_map {
                        [0.0 color rgb <1, 1, 1>*75]
                        [0.2 color rgb <1, 1, 1>*75]
                        [0.4 color rgb <1, 1, 1>*75]
                        [1.0 color rgb <0, 1, 1>]
                } 
        }
}
//-------------------------BLADE------------------------------------- 
#declare BLADE = object{ union{
merge{                                 //blade core
        sphere{ <0,0.96,0>,.0055
                hollow on
        }
        cone {  <0,0.96,0>,.0055        
                <0,0.24,0>,0.0095
                hollow on
        }
        pigment { color rgbt <1, 1, 1,.98> }
        finish{ambient 3}
        interior{ media{Inner} }                
} 
merge{                              //blade glow
        sphere {<0,0.97,0>,.023     //tip
                hollow on
        } 
        cone {  <0,0.97,0>,.023
                <0,0.28,0>,0.037
                hollow on 
        }
        sphere {<0,0.28,0>,.055     //base
                hollow on
                scale<0.675,1.0,0.675>
        } 
        pigment { color rgbt <1, 1, 1,0.99> }    //changing the transmit
value helps against white backgrounds
        finish{ambient .2}        
        interior{ media{Outer}
                  media{Middle} 
        }
}
}//----end of union-------
}//----End of object = Blade

object{BLADE}



-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.