POV-Ray : Newsgroups : povray.newusers : Light diffusion through prism : Re: Light diffusion through prism Server Time
2 Jul 2024 11:46:13 EDT (-0400)
  Re: Light diffusion through prism  
From: awestover
Date: 18 Apr 2011 22:05:00
Message: <web.4daced33dcf29308f9cdbc410@news.povray.org>
Maybe I'm not fully understanding photons and the light source, this is my first
pov ray program.

What I came up with after your post was

global_settings{
    photons{
        spacing 0.05 autostop 0
    }
}

light_source {
    <-5, -3, -8>
    color rgb <1, 1, 1>
    translate <-5, 5, -5>
    spotlight
    point_at <0,0,0>
    radius 10
    photons {
       refraction on
       reflection on
    }

}


camera {
    location <-15,10,-40>
    look_at <3,-2,0>
    angle 60
}

difference {
    box {
        <-4,-2,-8>,<4,2,8>
    }
    plane {
        <0,-1,0>,-1 rotate <0,0,60>
    }
    plane {
        <0,-1,0>,-1 rotate <0,0,-60>
    }
    hollow on
    pigment {
        color rgbt <.8,1,.9,.7>
    }
    finish{
        reflection{
            0.01 1 fresnel
        }
        conserve_energy
    }
    interior {
        ior 1.5 dispersion 1.03
        dispersion_samples 12
    }
    photons{
        target refraction on reflection on
    }
}

This makes a good triangular prism and the photons make it look good, but there
is still no visible light entering the prism/rainbow exiting. Am I doing
something wrong with the light source?


Post a reply to this message

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