From comp.graphics.raytracing Wed Nov 16 16:48:50 1994 Path: uniol!zib-berlin.de!prise.nz.dlr.de!news.dfn.de!swiss.ans.net!howland.reston.ans.net!pipex!sunic!news.funet.fi!nntp.hut.fi!vipunen.hut.fi!kkivisal From: kkivisal@vipunen.hut.fi (Kari Juhani Kivisalo) Newsgroups: comp.graphics.raytracing Subject: Spotlight beam in POV Date: 10 Nov 1994 22:03:24 GMT Organization: Helsinki University of Technology Lines: 71 Distribution: inet Message-ID: <39u5bc$fql@nntp.hut.fi> Reply-To: kkivisal@vipunen.hut.fi (Kari Juhani Kivisalo) NNTP-Posting-Host: vipunen.hut.fi Here is a good imitation of light beam in air. // POV-Ray 2.n scene file by Kari Kivisalo kkivisal@vipunen.hut.fi // Demonstrates use of a radial texture to make a spotlight beam #include "colors.inc" background { color Gray15 } camera { location <0, 3, -7> direction z up y right x*1.33 look_at <0, 1, 0> } #declare cos=color rgbf<1,1,1,0.6> //Color of spotlight #declare ros=5 //Radius of spotlight #declare rcm=ros/360 //Corresponding value in color map #declare fos=25 //Fall off angle of spotlight #declare focm=fos/360 //Corresponding value in color map #declare beam = plane{y,0 texture{ pigment{ radial color_map{ [0.00 color Clear] [0.5-focm color Clear] [0.5-rcm color cos] [0.50 color cos] [0.5+rcm color cos] [0.5+focm color Clear] [1.00 color Clear] } } finish{ambient 1 diffuse 0} } rotate<-90,0,90> } #declare spot= union{ object{beam} light_source { <0, 0, 0> color cos spotlight point_at <0, -1, 0> tightness 0 radius ros falloff fos } no_shadow } object{spot translate <0, 4, 0> rotate < 15, 0,-20>} plane { y, 0 texture { pigment { checker color Red color White} finish { diffuse 0.75 ambient 0.25 } } } sphere{<0,0.5,0>,0.5 pigment{color rgb<0.5,1,0.5>} finish{diffuse 0.8 phong 1} }