POV-Ray : Newsgroups : povray.text.scene-files : old Kodak aperture iris diaphragm Server Time
28 Jul 2024 10:16:38 EDT (-0400)
  old Kodak aperture iris diaphragm (Message 1 to 2 of 2)  
From: Bob Hughes
Subject: old Kodak aperture iris diaphragm
Date: 17 Jul 2000 18:57:40
Message: <39738f64@news.povray.org>
// pov script for the animation at p.b.a.

// Persistence of Vision Ray Tracer Scene Description File
// File: iris.pov
// Vers: 3.1
// Desc: camera aperture mechanism (old Kodak bellows type)
// Date: 00.543
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene
// Note: not completely accurate, especially the anchor pivots on the green
ring.
//       the leaves (petals) lack having any S-shape layering curvature.
//       needs Chris Colefax's ClockMod include file to animate as is.
//       yours to do with what you will.

// transparency amounts for x-ray view (use zero for solid)
#declare F=.25;
#declare T=.75;

global_settings {
        max_trace_level 12  // for x-ray view
}

camera {location -10*z
        up y right x
        look_at 0}
light_source {<50,50,-100>,1.5}

background {rgb 1}


#declare clock_type="W"
#include "clockmod.inc"
#declare _C_=mclock;

// diaphragm leaves or petals
#declare C=8;
#while (C>0)
union {
cylinder {<3.25,-.5,-.2>,<3.25,-.5,-.1>,.225 pigment {rgb .9-(C/10) filter F
transmit T-.25}}
union {
disc {<3.175,.2,0>,z,.825,0
   clipped_by {plane {-y,0 translate .2*y}}
}
disc {<-3.175,.2,0>,z,.825,0
   clipped_by {plane {-y,0 translate .2*y}}
}
disc {0,z,4,2.33
   clipped_by {plane {y,0 translate .2*y}}
}
 pigment {rgb .1+(C/10) filter F transmit T-.25}
   scale <1,.8,1>
 }
  rotate <-3,3,0> translate <4,0,-C/80> rotate (-6-(_C_*21))*z
   translate <-4.25,2,0> rotate C*45*z // this rotation based on number of
leaves (petals)
}
#declare C=C-1;
#end

// red aperture control ring
union {
box {-1,1 scale <2,.5,.125> translate <5.75,0,-.0667> rotate 45*z}
difference {
cylinder {0,-.133*z,3.9}
cylinder {.01*z,-.136*z,2.33}
#while (C<8)
box {-1,1 scale <.75,.25,1> translate 2.5*x rotate C*45*z}
#declare C=C+1;
#end
 }
  pigment {rgbf <1,0,0,.25> filter F transmit T}
   rotate (14-(_C_*55))*z translate -.275*z
}

// green aperture anchoring ring
#declare C=8;
union {
difference {
cylinder {-.125*z,.125*z,5}
cylinder {-.133*z,.13*z,3}
 pigment {rgbf <0,1,0,.25> filter F transmit T}
}
#while (C>0)
cylinder {<-4.5,-1.2,-.5>,<-4.5,-1.2,-.25>,.2
         pigment {rgb .9-(C/10) filter F transmit T-.25}
          rotate -45*z rotate C*45*z}
#declare C=C-1;
#end
    translate .5*z
}


// omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

From: Bob Hughes
Subject: Re: [Updated] old Kodak aperture iris diaphragm
Date: 21 Jul 2000 17:10:17
Message: <3978bc39@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: iris.pov
// Vers: POV-Ray 3.1, or MegaPov 0.5
// Desc: camera aperture mechanism (copied from old Kodak bellows camera)
// Date: 00.555
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene
// Note: not completely accurate, especially the anchor pivots back ring.
//       not correct flatness due to a lack of curved vane overlap
//       and I never saw the back section at all.
//       needs Chris Colefax's ClockMod include file to animate as is.

// #version unofficial MegaPov 0.5; // if using MegaPov uncomment this


//#declare clock_type="W" // this is so the aperture both opens AND closes
//#include "clockmod.inc" // need to have this file from Chris Colefax
#declare _C_=0.5; //clock; //mclock; // use mclock if wanted, or clock

// transparency amounts for x-ray view (use zeroes for solid)
#declare F=.5;
#declare T=.5;

global_settings {
        max_trace_level 12 // 12 for x-ray view, ~6 if not
}

camera {location <0,0,-15>
        up y right x // square resolution needed
        angle 50
        look_at 0}

//background {rgb .5}
sky_sphere {
        pigment {gradient y color_map {
                [0 color rgb<.9,.4,.3>]
                [.1 color rgb<.6,.6,.9>]
                [.3 color rgb<.4,.7,.9>]
                [1 color rgb<.3,.5,.8>]
        }}
}

/*
// use this section for animation of light ball flying through the aperture
#declare FuzzBall=
sphere {0,1 hollow
 pigment {rgbf 1}
  interior {media {
       // method 2 intervals 3 samples 4,4 // MegaPov needed
        scattering {2,.5}
        density {spherical density_map {
                [0 rgb 0]
                [1 rgb 1]
                }}}
 } scale 2.5
}

light_source {0,1
        looks_like {FuzzBall}
 area_light <3,0,0>,<0,3,0>,4,4 jitter adaptive 2
  // circular orient // MegaPov needed
 translate <-5,-5,-10>+(<7.5,7.5,15>*clock)
}

light_source {<15,15,-25>,.5}
*/

// comment this light out if using the FuzzBall lights
light_source {<15,15,-25>,1.5}


// diaphragm vanes (thanks for the word "vanes" Ken Tyler!)

#declare C=8;
#while (C>0)
union {
 torus {.25,.025 // control pivot tubes object
         clipped_by {cylinder {0,-.025*y,.25}} translate .025*y
  rotate -90*x scale <1,1,10> translate <3.45,-.33,-.025>
 }
union {
 disc {<3.175,.2,0>,z,.825,0
   clipped_by {plane {-y,0 translate .2*y}}
 }
 disc {<-3.175,.2,0>,z,.825,0
   clipped_by {plane {-y,0 translate .2*y}}
 }
 disc {0,z,4,2.33
   clipped_by {plane {y,0 translate .2*y}}
 }
   scale <1.067,.775,1>

 clipped_by {cylinder {<3.45,-.33,-.01>,<3.45,-.33,.01>,.225 inverse}
 cylinder {<-3.95,.175,-.01>,<-3.95,.175,.01>,.225 inverse}
 }
}
 texture {
  pigment {onion frequency 1 color_map {
        [0 color rgb <.675,.7,.75>*1.05 filter F transmit T-.25]
        [.4 color rgb <.65,.675,.675> filter F transmit T-.25]
        [.7 color rgb <.625,.65,.7>*.95 filter F transmit T-.25]
        }sine_wave scale 2}
   normal {onion .05 frequency 1 sine_wave scale 2}
    finish {ambient .025 diffuse .7 phong .7 phong_size 123
         metallic brilliance 3
         reflection .09
        // reflect_metallic blinn .4 facets .6 // MegaPov needed for this
          }
 scale <1.067,.775,1> translate <-1,-.5,0>
 }
 // interior {ior 30} // use in conjunction with blinn highlighting
  rotate <-3,3,0> translate <3.9,0,-C/80> rotate (-6-(_C_*21))*z
   translate <-4.2,2,0>
    rotate C*45*z // this rotation based on number of vanes
}
#declare C=C-1;
#end

// aperture control ring
union {
box {-1,1 scale <1.25,.5,.1> translate <5.24,0,-.1> rotate 45*z}
difference {
cylinder {0,-.2*z,4}
cylinder {.01*z,-.21*z,2.5}
#while (C<8)
box {-1,1 scale <.75,.25,1> translate 2.7*x rotate C*45*z}
#declare C=C+1;
#end
 }
  pigment {rgbf <.7,.7125,.725> filter F transmit T}
   normal {onion .0125 frequency 7 scallop_wave}
    finish {ambient .025 diffuse .3 phong .6 phong_size 111
         metallic brilliance 2
         reflection .075
          // reflect_metallic // again, MegaPov needed
          }
   rotate (17-(_C_*54))*z translate -.25*z
}

// aperture anchoring ring
#declare C=8;
union {
difference {
cylinder {-.125*z,.125*z,5.25}
cylinder {-.133*z,.13*z,3}
  pigment {rgbf <.75,.7525,.755> filter F transmit T}
   normal {onion .01 frequency 5}
    finish {ambient .025 diffuse .2 phong .4 phong_size 99
         metallic brilliance 1
         reflection .05
          // reflect_metallic // MegaPov
          }
}
#while (C>0)
 torus {.25,.025 // control pivot tubes object
         clipped_by {cylinder {0,-.025*y,.25}} translate -.025*y
  rotate 90*x scale <1,1,15> translate <-4.5,-1.4,.333>
  pigment {rgb .9-(C/10) filter F transmit T-.25}
          rotate -45*z rotate C*45*z}
#declare C=C-1;
#end
    translate .45*z
}


Post a reply to this message

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