POV-Ray : Newsgroups : povray.binaries.scene-files : Area_light vs point lights Server Time
2 Sep 2024 18:17:28 EDT (-0400)
  Area_light vs point lights (Message 1 to 1 of 1)  
From: Kari Kivisalo
Subject: Area_light vs point lights
Date: 19 Oct 2000 05:04:00
Message: <39EEB8F8.F01FD7A8@kivisalo.net>
#version 2.0

camera {
  location  <6,6,-6>
  direction <0,0,1.5>
  look_at   <1,0,0>
}

#declare length=10
#declare h=0.6
#declare i=1

#declare tube1=
union{
  light_source{
    <0, h, 0>
    color rgb<i,i,i>
    area_light <length,0,0>,<0,0,1>,32,1
  }
  cylinder{
    <-length/2,h,0>,<length/2,h,0>,0.05
    pigment{color rgb<1,1,1>}
    finish{diffuse 0 ambient 1}
    no_shadow
  }
}

#declare d=length/31
#declare di=i/32

#declare light=light_source{<-length/2,h,0> color rgb<di,di,di>}

#declare tube2=
union{
  object{light}
  object{light translate 1*d*x}
  object{light translate 2*d*x}
  object{light translate 3*d*x}
  object{light translate 4*d*x}
  object{light translate 5*d*x}
  object{light translate 6*d*x}
  object{light translate 7*d*x}
  object{light translate 8*d*x}
  object{light translate 9*d*x}
  object{light translate 10*d*x}
  object{light translate 11*d*x}
  object{light translate 12*d*x}
  object{light translate 13*d*x}
  object{light translate 14*d*x}
  object{light translate 15*d*x}
  object{light translate 16*d*x}
  object{light translate 17*d*x}
  object{light translate 18*d*x}
  object{light translate 19*d*x}
  object{light translate 20*d*x}
  object{light translate 21*d*x}
  object{light translate 22*d*x}
  object{light translate 23*d*x}
  object{light translate 24*d*x}
  object{light translate 25*d*x}
  object{light translate 26*d*x}
  object{light translate 27*d*x}
  object{light translate 28*d*x}
  object{light translate 29*d*x}
  object{light translate 30*d*x}
  object{light translate 31*d*x}

  cylinder{
    <-length/2,h,0>,<length/2,h,0>,0.05
    pigment{color rgb<1,1,1>}
    finish{diffuse 0 ambient 1}
    no_shadow
  }
}


object{tube2} // tube1=area_light tube2=point lights

#declare ball=sphere{<0,0.25,0>,0.25}

#declare row=
union{
  object{ball translate<-1.5,0,0.5>}
  object{ball translate<-0.5,0,0.5>}
  object{ball translate<0.5,0,0.5>}
  object{ball translate<1.5,0,0.5>}
}

union{
  object{row translate<0,0,1>}
  object{row translate<0,0,0>}
  object{row translate<0,0,-1>}
  object{row translate<0,0,-2>}
  pigment{color rgb<1,1,1>}
  finish{diffuse 1.5 ambient 0.1 phong 1}
}

plane{y,0
  texture{
    pigment{checker color rgb<1,1,1> color rgb<0.5,0.8,1>}
    finish{diffuse 1.5 ambient 0.1}
    scale 0.5
  }
}

______________________________________________________________________
Kari Kivisalo                                  http://www.kivisalo.net


Post a reply to this message

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