POV-Ray : Newsgroups : povray.binaries.images : Pointlight vs. spotlight media interaction (26kB) : Pointlight vs. spotlight media interaction (26kB) Server Time
3 Oct 2024 19:19:28 EDT (-0400)
  Pointlight vs. spotlight media interaction (26kB)  
From: Greg M  Johnson
Date: 10 Oct 1999 16:17:03
Message: <3800f43f@news.povray.org>
Here are images which document the difference between pointlight and
spotlight interactions with atmospheric media.  If that's the way it's
supposed to be, then so be it. This difference is quite annoying to me
as it goes against my intuition that point and spot lights should be the
same kind of animule, just different in their directional coverage.

(Apologies for earlier claiming it was a problem with the superpatch. I
have seen the same thing happen in 3.1g and sup 3.1e.)

The code allows either a point light or spot light to shine out of a
hole in a hollow sphere...

#include "colors.inc"
camera {
    location <0, 450, -900>
    look_at <0, 300, 0>
    angle 45
    }
light_source {  <0,0,0>
   color White*50

//Comment out this line or not to switch between point and spotlight..
   // spotlight    radius 45    falloff 28    point_at y
//yes, that line just above here, comment it out.

   media_interaction on
  }


light_source{<0,5550,0>  color White*2 media_interaction off}
difference{
        sphere{0,300 pigment {White}}
        sphere{0,299 pigment {Green}}
        cylinder{<0,0,0>,<0,500,0>,25 pigment {Green}}
        pigment {White}
        finish {ambient 0.2}
        }

sphere {<0,450,0>,10
        pigment {White}
        }
media {
   intervals 10
   scattering { 2, red 0.05 blue 0.001 green 0.02}
   samples 1, 10
   confidence 0.9999
   variance 1/1000
   ratio 0.9
 }


Post a reply to this message


Attachments:
Download 'pointspot.jpg' (26 KB)

Preview of image 'pointspot.jpg'
pointspot.jpg


 

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