POV-Ray : Newsgroups : povray.general : telesc-optics Server Time
12 Aug 2024 19:37:44 EDT (-0400)
  telesc-optics (Message 1 to 1 of 1)  
From: Bob Hughes
Subject: telesc-optics
Date: 22 Jan 1999 00:18:52
Message: <36A80A28.1AC6BD4A@aol.com>
Subject is a bit of a play on words.
This is a continuation of what Greg Johnson posted at
povray.binaries.animations.
I've skimmed the pov script off the top, as it were, to check out his
working telescope scene. Since this isn't exactly a scene here and more
of a test based upon his original I've moved over to povray.general
here.

If anyones wondered about lense objects for use in scenes this might
help shed a little light on the concept as relates to POV-Ray, only
slightly though in this case.
Not positive of my efforts to make this clear but here's the bare-bones
script:

//BEGIN
#include "colors.inc" 

global_settings {
max_trace_level 6
 }

 //check out the odd object/lense distance behaviour.
#declare distant = 60; //try 30, 60 and 120
 //If 30 is used the magnification drops, same as does 120 as would be
expected though.

#declare sZ = 1;
 //scaled 0.8 or greater in z starts to invert image background in y (if
ior 1.32)
 //but not the object. Greater than 1 in z inverts object in x (if ior
1.32)
 //and less than 0.8 will cause no inversion of both if object distance
is 60.
 //If object/lense separation, or ior changes, the above example is
irrelavent.

 //animation using clock 0 to 1 allows for better visualisation.
#declare _C_ = clock;

#switch (_C_) 
  #range (0,0.8) 
    #declare c1=_C_/0.8;
    #break //First case ends 
  #range (0.8,1) 
    #declare c1=1;
    #break 
  #else 
    #declare c1=1;
  #end 
  
#declare ccc=pow(c1,.1); 
//#declare ccc=0; 

#declare p=0.125; 
#declare a=2; 
//#declare tt=0.2; 
//#declare framet=.1; 
//#declare lenstype=2; //2 for big eyes 
  
background {SkyBlue} 
  
#declare dmin=a; 
#declare d=dmin/p;
#declare e=sqrt((dmin*dmin/p/p)-a*a); 

#declare lens= 
intersection{ 
        sphere {<0,0,e>,d} 
        sphere {<0,0,-e>,d} 
        pigment { Clear + Yellow/12} 
        finish {ior iR}
 // = ior 1.32 appears to be maximum magnification, < 1.32?, > 1.32?
     scale <1,1,sZ> //rescale z.
} 

#declare scope= 
union{ 
object {lens
        rotate <0,180,0> 
        } 
object {lens 
        rotate <0,180,0> 
        translate <0,0,1.752> 
        } 
difference{ 
cylinder {<.0,0,0>,<0,0,1.9>,2 
          texture { 
                  pigment {Silver} 
                  finish{metallic on 
                         } 
                  } 
         } 
cylinder {<.0,0,-.2>,<0,0,2.2>,1.9 
          texture { 
                  pigment {Silver} 
                  finish{metallic on 
                         } 
                  } 
        } 
}} 
  
object {scope} 

camera {location <15-15*ccc, 70-70*ccc, -15-90+90*ccc> angle 32 look_at
<0,0,40-40*ccc>}

light_source { <80, 1620, 80> color White } 
light_source { <-4000, 400, -4000> color White*.6 } 
  
plane {y,-9
      hollow 
      pigment { rgbf <.1,.3,.6,.9>  } 
      normal {bumps 
                rotate <0,0,45*_C_>} 
      finish {reflection 0.5} 
 }

box {<2,-4,distant+2>,<-2,-50,distant-2> 
       pigment { 
      wood 
      turbulence 0.1
      color_map { 
        [0.1  color Brown] 
        [0.5  color Brown] 
        [0.501  color White] 
        [1.  color White] 
      } 
    rotate <85,5,5> 
    scale 0.005 
    } 
 } 
  
box {-1,1
 pigment {gradient y color_map {
        [0 rgb<1,0,0>]
        [.5 rgb<0,1,0>]
        [1 rgb<0,0,1>]
 } rotate 30*x }
  finish {ambient .5 diffuse .5}
  scale .5 rotate <45,45,0> translate <0,0,distant>
 }

box {-1,1 scale 15 translate <0,-17.5,-10>
 pigment {rgb <0,1,0>}
 }

/*
//water
fog {
 fog_type 2
 distance 8
 color rgb <.2,.4,.8> 
 up <0,1,0>
 fog_offset -9
 fog_alt .0001
 } 
*/  
//END

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
=Bob


Post a reply to this message

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