|
|
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
|
|