Benutzer:Smial/povray1

aus Wikipedia, der freien Enzyklopädie
Zoom Prinzip

Eigentlich sollte hier der Sourcecode für das Bild rechts stehen, aber durch einen HD-Crash ist der verloren. Aber ich habe eine ältere Version wiedergefunden - muß mal schauen, ob ich das bei Gelegenheit wieder zurechtbasteln kann.

The following code does NOT belong to the image at the right. It's an older version, and erroneous. Due to an HD crash the original source is lost. I'll try to rebuild it, but in the meantime the code below may be useful for someone.

// Persistence of Vision Ray Tracer Scene Description File
// File: Zoom.pov
// Vers: 3.5
// Desc: Strahlengang in einem Zoomobjektiv
// Date: 31.12.2005
// Auth: Rainer Knaepper
// Quellen: http://www.arachnoid.com/raytracing/index.html
//          http://www.arachnoid.com/raytracing/telescope_galilean_dissected_oblique.pov
//          http://www.foto-net.de/net/objektive/kostruktion.html      
//          LINOS Photonics WinLens 4.3



#declare MINZOOM = 6.5;
#declare MAXZOOM = 10;        
#declare STRAHLEN = .08;  
#declare NBK7 = 1.518;
#declare SILICA = 1.458;
 
   
difference {
   //*PMName Aperture Plate
   
   box {
      //*PMName Plate
      <-0.01, -10, -10>, <0.01, 10, 10>
      scale 1
      rotate <0, 0, 0>
      translate <0, 0, 0>
      hollow false
   }
   
   union {
      //*PMName Holes
      
      cylinder {
         <-0.1, 0, 0>, <0.1, 0, 0>, STRAHLEN
         translate y*1.8
         hollow false
      }
      
      cylinder {
         <-0.1, 0, 0>, <0.1, 0, 0>, STRAHLEN
         translate y*.9
         hollow false
      }
      
      cylinder {
         <-0.1, 0, 0>, <0.1, 0, 0>, STRAHLEN 
         translate y*0
         hollow false
      }
      
      
      cylinder {
         <-0.1, 0, 0>, <0.1, 0, 0>, STRAHLEN
         translate y*(-.9)
         hollow false
      }
      
      cylinder {
         <-0.1, 0, 0>, <0.1, 0, 0>, STRAHLEN
         translate y*(-1.8)
         hollow false
      }
      hollow false
   }
   translate x*300
   
   pigment {
      color rgb <.5, 1, 0.0156863>
   }
   hollow false 
   photons { collect off }
}

global_settings {
   adc_bailout 0.0039216
   max_trace_level 12
   max_intersections 12
   noise_generator 2
   
   photons {
      count 40000
      media 40000, 0.0005
      autostop 1
   }
}

union {
   //*PMName Variogon
   
   difference {
      //*PMName Dissectable
      
      union {
         //*PMName Component Collection
         
         difference {
            //*PMName Scope Tube
            

               cylinder {
                  //*PMName Main Tube
                  <0, 0, 0>, <12, 0, 0>, 2.2
               }
               
               cylinder {
                  //*PMName Main Tube Interior
                  <-0.001, 0, 0>, <12.001, 0, 0>, 2
               }
               
               pigment {
                  color rgb <0.1, 0.1, 0.1>
               }
            
         }
         
         pigment {
            color rgb <0.6, 0.01, 0.2>
         }
         scale 1
         finish {
            specular 0.1
            
            reflection {
               rgb <0.1, 0.1, 0.1>
            }
         }
      }
      
      box {
         //*PMName Cross-section Box
         <-.10, -3, 0>, <12.1, 3, -3>
         
         pigment {
            color rgb <0.01, 0.01, 0.2>
         }
      }  
      photons { collect off }
   }
   
   union {
      //*PMName Non-dissectable
      
      intersection {
         //*PMName Photon Volume dissector
         
         box {
            //*PMName Thin slice Dissection Box
            <-4.5, -2, 0.1>, <18, 2, -0.1>
            scale 1
            rotate <0, 0, 0>
            translate <0, 0, 0>
            hollow
         }
         
         pigment {
            color rgbf <1, 1, 1, .999>
         }
         
         interior {
            media {
               scattering {
                  1, rgb <1, 1, 1>
                  extinction 0
               }
            }
         }
         
         photons {
            target
            collect off
         }
         hollow
      }         
      
     intersection {
         //*PMName Objective Lens Front
         cylinder {
            <-2, 0, 0>, <2, 0, 0>, 2
            scale 1
         }
        
         intersection {

         
                sphere {
                <9.6, 0, 0>, 10
                }
         
                sphere {
                <-9.6, 0, 0>, 10
                }
         
         }
         
         pigment {
            color rgbt <0.27451, 0.37255, 0.37255, 0.95>
         }
         finish {
            specular 0.1
            
            reflection {
               rgb <0.05, 0.00, 0.00>
            }
         }
         
         interior {
            ior 1.5
         }
         hollow
         translate x*11.8
                        
      }
                   
      difference {
         //*PMName konvex
         
         cylinder {
            <-2, 0, 0>, <2, 0, 0>, 1.6
            scale 1
         }
         
         union {
            sphere {
               <-3.05, 0, 0>, 3
            }
            
            sphere {
               <+5.05, 0, 0>, 5
            }
         }
         
         pigment {
            color rgbt <0.34902, 0.50588, 0.53725, 0.95>
         }
         
         finish {
            specular 0.1
            
            reflection {
               rgb <0.05, 0.01, 0.01>
            }
         }
         hollow
         interior {
            ior 1.55
         }  
         
         translate <MINZOOM + clock * (MAXZOOM-MINZOOM),0,0>
      }
   }
      
     intersection {
         //*PMName Objective Lens 3
         cylinder {
            <-2, 0, 0>, <2, 0, 0>, 1.9
            scale 1
         }
        
         intersection {

         
                sphere {
                <9.6, 0, 0>, 10
                }
         
                sphere {
                <-9.6, 0, 0>, 10
                }
         
         }
         
         pigment {
            color rgbt <0.27451, 0.37255, 0.37255, 0.95>
         }
         finish {
            specular 0.1
            
            reflection {
               rgb <0.05, 0.00, 0.00>
            }
         }
         
         interior {
            ior 1.5
         }
         hollow
         translate x*4.5
                        
      }
     
      
         
     intersection {
         //*PMName Objective Lens Rear
         cylinder {
            <-2, 0, 0>, <2, 0, 0>, 1.9
            scale 1
         }
        
         intersection {

         
                sphere {
                <4.4, 0, 0>, 5
                }
         
                sphere {
                <-4.4, 0, 0>, 5
                }
         
         }
         
         pigment {
            color rgbt <0.27451, 0.37255, 0.37255, 0.95>
         }
         finish {
            specular 0.1
            
            reflection {
               rgb <0.05, 0.00, 0.00>
            }
         }
         
         interior {
            ior 1.5
         }
         hollow
         translate x*.5
                        
     }
   
}   
   
   
   box {
      //*PMName Mattscheibe
      <-.050, -5, -5>, <0, 5, 5>
      scale 1
      rotate <0, 0, 0>
      translate <0, 0, 0>
      //*hollow
      
         
         pigment {
            color rgbf <1, 1, 1, 0.9>
         }
         
         interior {
            media {
               scattering {
                  1, rgb <1, 1, 1>
                  extinction 0
               }
            }
         }
         
         //*photons {
         //*   target off
         //*   collect off
         //*}
      translate -x*4.5
   
   }    



light_source {
   //*PMName Area Light
   <25, 5, -61.525>, rgb <4, 4, 4>
   spotlight
   radius 45
   falloff 45
   point_at <0, 0, 1>
   media_interaction off
   media_attenuation off
   
   photons {
   }
}

sky_sphere {
   pigment {
      color rgb <0.101961, 0.160784, 0.2>
   }
}

plane {
   <0, 1, 0>, 0
   
   pigment {
      agate
      agate_turb 0.5
      
      color_map {
         [ 0 color rgb <0.25098, 0.25098, 0.25098>
         ]
         [ 0.1 color rgb <0.458824, 0.458824, 0.458824>
         ]
      }
   }
   scale 1
   rotate <0, 0, 0>
   translate y*(-10000)      
   photons { collect off }
}

light_source {
   //*PMName Scope Photon Source
   <100000, 0, 0>, rgb <0, 20, 20>
   spotlight
   radius 10
   falloff 10
   point_at <0, 0, 1>
   media_interaction off
   media_attenuation off
   
   photons {
      refraction on
   }
}

camera {
   //*PMName Wide Cam
   perspective
   location <4, 20, -80>
   sky <0, 1, 0>
   direction <0, 0, 1>
   right <1.3333, 0, 0>
   up <0, 1, 0>
   look_at <4, 0, 0>
   angle 13
}