POV-Ray : Newsgroups : povray.general : Problem by projecting fringes through lenses : Problem by projecting fringes through lenses Server Time
31 Jul 2024 20:12:26 EDT (-0400)
  Problem by projecting fringes through lenses  
From: Louis-Severin
Date: 5 Sep 2006 03:10:01
Message: <web.44fd225dcc224b6d337e73ab0@news.povray.org>
Hello,

I have problem using fringe projection through several lenses. Hereunder my
povray code. If i project fringe through a single lens, fringe shadow
appear clearly. But if i put another lens, also with photon properties, the
shadow appear as a simple black square.

I thank you in advance for any help !

Best regards from Switzerland and have a nice day !

My code:

/*INCLUDES
==========*/
#include "colors.inc"


/* PHOTON TUNING
================*/
global_settings {
  photons {
    spacing .07
    gather 5,15
    }
}

/* LIGHT APPEARANCE
===================*/
#declare Lightbulb = union{
sphere { <0,0,0>,1 }
pigment {White}
}


/*BACKGROUND
============*/
background {color Cyan}


#declare ALP_H = 5;
#declare ALP_W = 5;
#declare nb_periods = 8;
#declare length_period = ALP_H / nb_periods;

#declare SinePig = pigment {
  gradient y
  scale ALP_H/nb_periods
  sine_wave
  color_map {
    [0 color <0,0,0> transmit 0]
    [1 color <0,0,0> transmit 1]
  }
};


/* LENS PRIMITIVE
=================*/
#declare R_LENS   = 55.0; // sphere radius (influences magnification)
#declare K_LENS = 0.995;   // overlapping coefficient (influences lens
diameter)

#declare Lens = intersection{
  sphere{<0,0,0>,R_LENS  translate <-K_LENS*R_LENS,0,0>}
  sphere{<0,0,0>,R_LENS  translate <K_LENS*R_LENS,0,0>}

  pigment {White filter 1}
  interior {ior 1.5}// index of refraction (Glass=1.5)
  photons {
    target //.25
    refraction on
    reflection off
  }
};


/* PROJECTION SYSTEM (aligned along x axis and then rotated along z axis)
====================*/
union{
            /* LENS(ES)
            ===========*/
            object{Lens}
            object{Lens translate<-120,0,0>}


            /*SIGNAL GENERATION
            ===================*/
            intersection{
              plane { x, 0
                pigment {SinePig }
                photons {
                  target //.5
                  refraction on
                  reflection off
                }

                clipped_by {
                  box {
                    <-1,-ALP_H/2,-ALP_W/2>,
                    <1,ALP_H/2,ALP_W/2>
                  }
                }

                translate <-1000,0,0>
              }
            }


            /*LIGHT SOURCE
            ==============*/
            light_source {
             <-2000,0,0>
             2*White
             cylinder
             radius 10
             falloff 15
             point_at <0,0,0>
             looks_like { Lightbulb  }
            }


            /* TRANSLATION AND ROTATION
            ======================================*/
            translate <-78,0,0>
            rotate <0,0,-45>

}




/*PLANE
=======*/
plane {y,0 pigment {checker color Red*0.2 color Red*0.3 scale 0.5}}


/*CAMERA
========*/
camera {
orthographic // Telecentric
location 1*<0,10,0>
look_at <0,0,0>}


Post a reply to this message

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