POV-Ray : Newsgroups : povray.advanced-users : Source Code : Re: Source Code Server Time
30 Jul 2024 00:30:39 EDT (-0400)
  Re: Source Code  
From: Chris Huff
Date: 10 Nov 2000 17:05:12
Message: <chrishuff-BB5DED.17051710112000@news.povray.org>
In article <3A0C4128.CD531D3E@hotmail.removethisbit.com>, Richard 
Morton <ric### [at] hotmailremovethisbitcom> wrote:

> It's always struck me as strange that this is the way that raytracing 
> has to work, ie start from the film or screen and work backwards. 
> What's missing below is that the ray has to continue until it hits a 
> light source or goes off into infinity (in which case it won't 
> appear).

Not quite...once it hits an object, a second ray is fired *toward the 
light source(s)* to determine whether the point is in shadow. If light 
can reach the object, the normal, distance, etc. are used to calculate 
the shading of the surface.
Firing a bunch of rays into the scene hoping to hit a point-sized light 
source would be...slow. ;-)
And it wouldn't be giving you the results you wanted anyway, it would 
only calculate specular reflection.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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