POV-Ray : Newsgroups : povray.general : Oject as Light Source : Oject as Light Source Server Time
14 Aug 2024 01:23:25 EDT (-0400)
  Oject as Light Source  
From: yang444
Date: 10 Apr 1998 23:26:01
Message: <352EE2C9.996FDC95@pacbell.net>
I have POVRay 3.0 for Windows, running on W95.

Object-as-Light_Source seems to only partially work for me.

I have declared a sphere as an object, with a position.
I have a light_source with a position.

When rendered, the object's position is always the sum of
the two positions, but the light always seems to come from
the position of the light_source alone.

In the example below, you can see the light is coming from the position of
light_source.
Change the positions around, and see if what I say isn't true.

Can someone explain this?
Isn't the light supposed to come from the object?
--------------------

#include "colors.inc"
camera
{ location <-3, 3, -15>  look_at 0  angle 30
}
#declare s = sphere
{ < -1 , -1 ,  1>, .5
  pigment { color White }
  finish {ambient .8}
}
light_source
{ < 1  , 1  , -1  >
  color White
  looks_like { s }
}
#declare b = box
{ <1 , -1 , 1.3>, <3, 1.2, 3.3>
  pigment { color White }
  finish {ambient .3}
}
b
//x-y-z axes
cylinder { -100*x, 100*x, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*z, 100*z, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*y, 100*y, .03  pigment {Gold} finish {ambient .8}}


--
Alan


Post a reply to this message

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