POV-Ray : Newsgroups : povray.programming : Strange piece of code : Re: Strange piece of code Server Time
1 Jun 2024 09:25:30 EDT (-0400)
  Re: Strange piece of code  
From: Warp
Date: 15 Jun 2005 14:12:36
Message: <42b06f94@news.povray.org>
Celui <lmagnin AT ens-lyon.fr> wrote:
> if (Cos_Shadow_Angle < EPSILON)
> {
>    return;
> }

> What's the role of this code ?

  If the cosine of the angle between the normal vector and the light
vector is negative it means that the normal vector is pointing away
from the light source. That is, the surface is pointing away from
the light source. It shouldn't thus be illuminated.
  I assume that if you remove that piece of code, all your surfaces
will be double-illuminated.

-- 
                                                          - Warp


Post a reply to this message

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