Attachment 'Block_bolt3.pov'

Download

   1 // "BlockBolt3.pov"
   2 //  Block of laminations, windings, and coating
   3 //  KHL 2017-Dec-29
   4 //
   5 #version 3.7;
   6 global_settings{ assumed_gamma 1.0 }
   7 
   8 #default{ finish{ ambient 0.1 diffuse 0.9 }} 
   9 #include "colors.inc"
  10 #include "textures.inc"
  11 
  12 #declare COIL=1 ;    // draw the coil
  13 #declare CORE=1 ;    // draw the core
  14 #declare DIAM=1 ;    // draw the diamond coating
  15 
  16 // camera setup -------------------------------------------------------------
  17 #declare Camera_Location =  <4.5  , 2.0 ,-4.0> ;  // diagonal view
  18 #declare Camera_Look_At  =  < 0.05 , 0.00 , -0.35> ;
  19 #declare Camera_Angle    =  32 ;
  20 
  21 // camera and lights -------------------------------------------------------
  22 camera{ // ultra_wide_angle // orthographic 
  23         location Camera_Location
  24         right    x*image_width/image_height
  25         angle    Camera_Angle
  26         look_at  Camera_Look_At
  27       }
  28 
  29 // sun and "camera flash" -----
  30 // light_source{< 500,1500,-2500> color rgb<1,1,1>*0.9}                // sun
  31 light_source{< 500,1500,-250> color rgb<1,1,1>*0.9}                // sun
  32 light_source{ Camera_Location  color rgb<0.9,0.9,1>*0.0 shadowless}// flash
  33 
  34 sky_sphere{ pigment{ color rgb<1,1,1> } }
  35 
  36 #include "math.inc" 
  37 #include "shapes3.inc"
  38 
  39 #local BWR = 0.008 ;  // Wire diameter
  40 #local BWX = 0.50  ;  // rectangular loop depth: min 2*WR (pitch)
  41 #local BWY = 0.50  ;  // rectangular loop height
  42 #local BWZ = 0.06  ;  // loop spacing
  43 #local BWL = 66    ;  // number of loops
  44 #local LLEN = 0.5*BWL*BWZ ;
  45 
  46 #local LAM  = 0.017 ;  // lamination thickness
  47 #local LAMG = 0.005 ;  // lamination gap
  48 #local DY = LAM+LAMG ; // lamination stack
  49 
  50 #local BWT = 0.5*BWZ*(BWL-0) ; // end of magnet core (extended)
  51 
  52 // Winding_Loop macro: A rectangular coil of wire ---------------------------
  53 
  54 #macro Winding_Loop(  WR_    , // 0.03; // Wire radius
  55                       WX_    , // 0.50; // X width
  56                       WY_    , // 0.20; // Y width
  57                       WZ_    , // 0.10; // Loop spacing
  58                       Loops_ , // 20  ;
  59                     ) // end of loop parameters
  60 
  61 #local WR    = WR_          ; // Wire radius
  62 #local WZ    = WZ_          ; // Loop Z spacing: min 2*WR  (pitch)
  63 #local WX    = 0.5*WX_+WR_  ; // Loop X width
  64 #local WY    = 0.5*WY_+WR_  ; // Loop Y width
  65 #local Loops = Loops_       ; // Integer
  66 
  67 #local RectLoop = 
  68 union{ 
  69        sphere{   < WX, WY,0>,             WR  }
  70        cylinder{ < WX, WY,0>,< WX,-WY,0>, WR  } 
  71        sphere{   < WX,-WY,0>,             WR  }
  72        cylinder{ < WX,-WY,0>,<-WX,-WY,0>, WR  } 
  73        sphere{   <-WX,-WY,0>,             WR  }
  74        cylinder{ <-WX,-WY,0>,<-WX, WY,0>, WR  } 
  75        sphere{   <-WX, WY,0>,             WR  }
  76        cylinder{ <-WX, WY,0>,< WX, WY,0>, WR  } 
  77 }
  78 // end of RectLoop union ---
  79 
  80 // Stack of Nr loops in Z direction ------------------------------
  81 union{ 
  82  #local  NZ = 0.5*(Loops-1.0)*WZ ;
  83  #local  DZ = -NZ;             // start
  84  #while (DZ <= NZ )            // loop
  85    object{ RectLoop translate<0, 0, DZ > }
  86    #local DZ = DZ + WZ; // next DZ
  87  #end // end of DZ loop
  88 
  89 } 
  90 
  91 #end  // --- end of Winding_Loop macro --------------------------------------
  92 
  93 // NOW, DRAW THE COIL
  94 
  95 // Winding loop group instance ----------------------------------
  96 
  97 #if( COIL )
  98 object{ Winding_Loop( BWR, // Wire radius
  99                       BWX, // rectangular loop X width
 100                       BWY, // rectangular loop Y width
 101                       BWZ, // loop spacing: min 2*WR (pitch)
 102                       BWL  // number of loops
 103                       )  
 104 
 105         // approximate copper color
 106         texture{ pigment{ color rgb< 0.85, 0.37, 0.15>*0.59 }
 107                  finish { phong 1.0 specular 0.3 reflection{ 0.25 metallic 0.5 } }
 108                } // end of copper texture
 109 
 110         // translate and rotate 
 111         // rotate<0,0,0> 
 112         // translate<0,0,0>
 113       } // end of Winding_Loop object instance
 114 
 115 #end // COIL
 116 // End of Winding Loop group instance ----------
 117 
 118 
 119 // laminated iron core instance ---------------------------
 120 #if( CORE )
 121 
 122 object{
 123    union {
 124       #local WX= 0.5*BWX ;
 125       #local WY= 0.5*BWY ;
 126       #local LY=0.5*DY-WY;
 127       #local LAY = LAM/2 ;
 128 
 129       #while ( LY < WY )            // loop
 130         box{ <-WX,-LAY,-LLEN>, <WX,LAY,LLEN> translate<0,LY,0> }
 131         #local LY = LY + DY ;
 132       #end // end LY loop
 133    }
 134 
 135    // approximate iron color
 136    texture{ pigment{ color rgb<1,1,1>*0.3 }
 137             finish{ phong 0.0 specular 0.2 }
 138    } // end of iron texture
 139 } 
 140 #end // CORE
 141 // end of iron core instance -------------------
 142 
 143 // amorphous diamond coating instance ----------------------
 144 #if( DIAM )
 145 
 146 #local  BMX = -0.5*BWX ;
 147 #local  BMY = -0.5*BWY ;
 148 #local  BMZ =    -LLEN ;
 149 #local  BPX =  0.5*BWX ;
 150 #local  BPY =  0.5*BWY ;
 151 #local  BPZ =     LLEN ;
 152 #local  BR  =  3.0*BWR ;
 153 
 154 merge{ 
 155   box { <BMX-BR,BMY,BMZ>,<BPX+BR,BPY,BPZ>  material{M_Glass} }
 156   box { <BMX,BMY-BR,BMZ>,<BPX,BPY+BR,BPZ>  material{M_Glass} }
 157   box { <BMX,BMY,BMZ-BR>,<BPX,BPY,BPZ+BR>  material{M_Glass} }
 158   cylinder{ <BMX,BMY,BMZ>,<BPX,BMY,BMZ>,BR material{M_Glass} }
 159   cylinder{ <BMX,BMY,BPZ>,<BPX,BMY,BPZ>,BR material{M_Glass} }
 160   cylinder{ <BMX,BPY,BMZ>,<BPX,BPY,BMZ>,BR material{M_Glass} }
 161   cylinder{ <BMX,BPY,BPZ>,<BPX,BPY,BPZ>,BR material{M_Glass} }
 162   cylinder{ <BMX,BMY,BMZ>,<BMX,BPY,BMZ>,BR material{M_Glass} }
 163   cylinder{ <BMX,BMY,BPZ>,<BMX,BPY,BPZ>,BR material{M_Glass} }
 164   cylinder{ <BPX,BMY,BMZ>,<BPX,BPY,BMZ>,BR material{M_Glass} }
 165   cylinder{ <BPX,BMY,BPZ>,<BPX,BPY,BPZ>,BR material{M_Glass} }
 166   cylinder{ <BMX,BMY,BMZ>,<BMX,BMY,BPZ>,BR material{M_Glass} }
 167   cylinder{ <BPX,BMY,BMZ>,<BPX,BMY,BPZ>,BR material{M_Glass} }
 168   cylinder{ <BMX,BPY,BMZ>,<BMX,BPY,BPZ>,BR material{M_Glass} }
 169   cylinder{ <BPX,BPY,BMZ>,<BPX,BPY,BPZ>,BR material{M_Glass} }
 170   sphere{   <BMX,BMY,BMZ>,              BR material{M_Glass} }
 171   sphere{   <BMX,BMY,BPZ>,              BR material{M_Glass} }
 172   sphere{   <BMX,BPY,BMZ>,              BR material{M_Glass} }
 173   sphere{   <BMX,BPY,BPZ>,              BR material{M_Glass} }
 174   sphere{   <BPX,BMY,BMZ>,              BR material{M_Glass} }
 175   sphere{   <BPX,BMY,BPZ>,              BR material{M_Glass} }
 176   sphere{   <BPX,BPY,BMZ>,              BR material{M_Glass} }
 177   sphere{   <BPX,BPY,BPZ>,              BR material{M_Glass} }
 178 } 
 179 
 180 #end // DIAM
 181 // end of amorphous diamond coating instance --------------
 182 
 183 // End of .pov file ----------------------------
 184 

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2018-01-01 03:31:58, 139.3 KB) [[attachment:Block_bolt3.png]]
  • [get | view] (2018-01-01 03:31:50, 6.4 KB) [[attachment:Block_bolt3.pov]]
  • [get | view] (2018-01-01 06:21:26, 169.5 KB) [[attachment:Block_bolt3s.png]]
  • [get | view] (2018-01-01 03:31:26, 173.5 KB) [[attachment:rotor05.png]]
  • [get | view] (2017-05-27 06:59:47, 19.7 KB) [[attachment:rotor2.png]]
  • [get | view] (2017-05-27 07:00:02, 87.1 KB) [[attachment:rotor2.svg]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.