POV-Ray : Newsgroups : povray.newusers : Wrong reflection... : Re: Wrong reflection... Server Time
31 Jul 2024 06:12:42 EDT (-0400)
  Re: Wrong reflection...  
From: Mark Wagner
Date: 22 Dec 2002 01:04:25
Message: <pan.2002.12.22.06.03.01.124532.254@gte.net>
On Sat, 21 Dec 2002 03:37:37 -0500, Jerome quoth:

> Hi All,
> 
> I try to copy some POV sources to create a beam splitter, but
> irremediatly it fails. The reflected laser beam goes in the wrong
> direction (and nothing is transmitted). I join the code source.

Try something like the following.  I added a transparent plane at y*24 and
moved the ground plane up to y*-25 to force POV-Ray to calculate the media
more accurately in the area where the laser beam is.  I also added a box
to contain the media, since infinite media doesn't work properly with
photons (when you spread out 100 photons over the length of an infinitely
long ray, you aren't likely to see any of them).  The apparent "goes the
wrong way" laser beam is simply a reflection of the portion of the beam
between the light source and the prism.

Right now the media photons are spaced fairly far apart.  To fix this, you
can either increase the media photon count in the global_settings block
(which will slow the rendering down further), or make the box containing
the media smaller.

#include "colors.inc"


  global_settings {
                   max_trace_level 5
                   photons {
                            spacing .1
                            autostop 10
                            media 100
                            jitter 0
                           }
                   }


camera {
        orthographic
        location  <-200, 200, 0>
        look_at   <0, 0, 100>
       }


box{<-1000,-26,-1000>,<1000,1000,1000> interior{
	media {
	       scattering {0.5, color White extinction 0} method 3
	       intervals 1 samples 10
	      }
	}
	hollow
}

plane{y, 24 pigment{rgbt 1} hollow}


light_source { <0,0,-400> Red
               spotlight
               point_at <0,0,400>
               cylinder
               parallel
               radius 3.1 falloff 3.2
               tightness 1
               media_interaction on
		photons{reflection on refraction on}
             }


light_source {<800, 800, 400>, color White
             photons {refraction off reflection off} media_interaction off
             }


plane { y, -25
       pigment {
                checker color HuntersGreen color SummerSky scale 50
                scale <3, 1, 3>
               }
    finish {
            ambient 0.2
            diffuse 0.6
           }
      }



prism   {
        linear_spline
        -25, 25, 3,
        <-25,150>, <-25,100>, <25,150>
        pigment{rgbt<0,0,0,1>}
        finish  {
                ambient 0
                diffuse 0
                reflection 0.5
                }
        interior{ior 1.5}
        photons{
        target
        reflection on
        refraction on
        collect on
               }
        }

//box{<150,-25,100>,<152,25,150> pigment{rgb 1}}


Post a reply to this message

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