Billede:ConcaveFocalLength.png

Fra Wikipedia, den frie encyklopædi


Denne fil er fra Wikimedia Commons, en samling af åbent indhold som Wikimedia Foundation er vært for.
Beskrivelsen fra siden med beskrivelse af billedet er vist nedenfor.


This image (or all images in this article or category) should be recreated using vector graphics as an SVG file. This has several advantages; see Commons:Images for cleanup for more information. If an SVG form of this image is already available, please upload it. After uploading an SVG, replace this template with template {{SupersededSVG|new image name.svg}} in this image.

Česky | Deutsch | English | Español | Français | Italiano | Nederlands | Polski | Português | Русский | العربية | +/-

[edit] Description

Shows how the geometry of lightbeams going through a concave, spherical lens from left to right, points out the focal point and hence the focal length of that lens.

[edit] Licensing

I, the author of this work, hereby publish it under the following license:
Creative Commons License
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike 2.5 License


[edit] POV-Ray code

This image was rendered using POV-Ray for Windows version 3.6 and the scene description code below. Note that the POV-Ray installation needs to have access to the font file "timesbi.ttf" for rendering the bold italic "f" in the image.

/*
================================================
Demonstrating focal length for a concave lens
------------------------------------------------
Created by Søren Peo Pedersen - see my user page
at http://da.wikipedia.org/wiki/Bruger:Peo
================================================
*/

#declare LR=5.5;                  // Radii in lens
#declare IndexOfRefraction=1.66;  // Simulated index of refraction
#declare VisF=1;                  // Show "f" annotation? 0=no, any other number=yes
#declare LineWidth=0.02;          // 

#declare FL=1/(IndexOfRefraction-1)/(2/LR);
#declare LS=LR+.05;

#macro DashedLine(L)
union {
  #local cnt=0;
  #while (cnt<L)
    box {<-.03,cnt/2,-.02>,<.03,cnt/2+.25,-.021>}
    #local cnt=cnt+1;
  #end
  }
#end

#macro Beam(Shift)
  #local pX1=sqrt(LR*LR-Shift*Shift)-LS;
  #local VI1=asin(Shift/LR);
  #local VO1=asin(Shift/LR*IndexOfRefraction);
  #local LLa=-tan(VI1-VO1);
  #local LLb=(Shift-LLa*pX1);
  #local pX2=pX1+1;
  #local pY2=Shift+LLa;
  #local ALa=1+LLa*LLa;
  #local ALb=(-2*LS+2*LLa*LLb);
  #local ALc=LS*LS+LLb*LLb-LR*LR;
  #local ALD=ALb*ALb-4*ALa*ALc;
  #local pX2=(-ALb-sqrt(ALD))/(2*ALa);
  #local pY2=sqrt(LR*LR-(pX2-LS)*(pX2-LS))*select(LLa,-1,1,1);
  #local Vud=atan(pY2/(pX2+LS));
  #local VI2=Vud+VI1-VO1;
  #local VO2=asin(sin(VI2)*IndexOfRefraction);    
  #local DIR=Vud+VO2;
  #local pX3=pX2+50*cos(DIR);
  #local pY3=pY2+50*sin(DIR);

  union {
    sphere_sweep {
      linear_spline,4,
      <-50,Shift,0>,LineWidth
      <pX1,Shift,0>,LineWidth
      <pX2,pY2, 0>,LineWidth
      <pX3,pY3, 0>,LineWidth
      pigment {color rgb<1,.95,.8>}
      finish {ambient 1 diffuse 0}
      no_shadow no_reflection        
      translate <0,0,-LineWidth>
      scale <1,1,.5>
      }
    cylinder {0,<0,1000,1>,LineWidth        
      pigment {
        gradient y
        color_map {
          [0.0 color rgbft <1,.95,.8,0,.6>]
          [0.5 color rgbft <1,.95,.8,0,.6>]
          [0.5 color rgbft <1,.95,.8,0,1>]
          [1.0 color rgbft <1,.95,.8,0,1>]
          }
        scale .5
        }
      finish {ambient 1 diffuse 0}
      no_shadow no_reflection
      rotate <0,0,90+DIR*180/pi>
      translate <pX2,pY2,-LineWidth>
      scale <1,1,.5>
      }
    }
#end

#if (VisF != 0)   // Include annotation of "f" length in image?
  union  {
    #object {DashedLine(11) translate <0,-2.8,0>}
    #object {DashedLine( 7) translate <pi/LR-FL,-2.8,0>}
    text {ttf "timesbi.ttf"
      "f",.1,0
      translate <(pi/LR-FL)/2-.3,-3,0>
      }
    triangle {<0,-2.7,0>,<-.5,-2.5,0>,<-.5,-2.9,0>}
    box {<-.5,-2.66,.001>,<(pi/LR-FL)/2+.3,-2.74,0>}
    triangle {<pi/LR-FL,-2.7,0>,<.5+pi/LR-FL,-2.5,0>,<.5+pi/LR-FL,-2.9,0>}
    box {<.5+pi/LR-FL,-2.66,.001>,<(pi/LR-FL)/2-.3,-2.74,0>}
    pigment {color rgb 1} finish {ambient 1 diffuse 0}
    }    
#end

difference {      // The lens itself
  cylinder {<-LS,0,0>,<LS,0,0>,2.3}
  sphere {<-LS,0,0>,LR}
  sphere {< LS,0,0>,LR}
  plane {<0,0,1>,0}
  pigment {color rgbt <.8,1,.9,.7>}
  finish {phong 1 reflection .1 ambient .5}
  interior {ior IndexOfRefraction}
  }

#object {Beam( 2.0)}  // Beams: The number
#object {Beam( 1.5)}  // in parenthesis are
#object {Beam( 1.0)}  // the Y coordinates
#object {Beam( 0.5)}  // for each beam of
#object {Beam( 0)}    // light coming in
#object {Beam(-0.5)}  // from the left
#object {Beam(-1.0)}
#object {Beam(-1.5)}
#object {Beam(-2.0)}

camera {
  location <-FL/2,-.5,-500>
  look_at <-FL/2,-.5,0>
  angle 1
  }

light_source {<100,100,-100> color rgb 1}

De følgende sider henviser til dette billede: