POV-Ray : Newsgroups : povray.newusers : emission penetration into glass : emission penetration into glass Server Time
5 Jul 2024 03:37:34 EDT (-0400)
  emission penetration into glass  
From: Tomohiro
Date: 14 Jun 2010 21:10:02
Message: <web.4c16d22d5a261937ad62c3830@news.povray.org>
I would like to build an image that a laser beam penetrates and
focused into a piece of glass. I tried to express the laser beam
as a transparent object with emission. The following is a source
code for that. Please try #declare GLASS=1 and GLASS=0 and compare
the images. The result has two problems:
1. Laser beam is hardly visible inside the glass, even if the part
   of laser beam of the glass is cut using CSG.
2. The usage of CSG gives a distinct outline of the beam, which looks
   strange.
Could you please tell me how to solve the problem?


#declare GLASS = 1;

camera{ location <15,20,-40> look_at <0,0,0> }
light_source{ <-50,200,-200> rgb<1,1,1> }
background{rgb 0.1}

#if (GLASS)
  difference{
    box{<-10,-5,-20>,<10,5,20>}
    cone{<0,50,0>,10.0001,<0,0,0>,0.0001}
    sphere{<0,0,0>,1 scale<4,8,4>}
    material{
      texture{
        pigment{color rgbt<.98, .98, .98, .9>}
        finish{ ambient 0.1 diffuse 0.1 reflection 0.2 specular 0.8 roughness
0.01 phong 1 phong_size 400}
      }
      interior{ior 1.03}
    }
  }
#end

union{
  cone{<0,50,0>,10,<0,0,0>,0
    pigment{color rgbf<1,1,1,1>}
    interior{media{ emission rgb<.2, .1, 0> }}
    hollow
  }
  sphere { <0,0,0>, 1
    pigment {color rgbf<1,1,1,1>}
    interior{media{ emission rgb<.2, .2, .2> density{spherical color_map{[0 rgb
0][0.5 rgb 1][1 rgb 3]}} }}
    hollow
    scale <4,8,4>
  }
}


Post a reply to this message

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