POV-Ray : Newsgroups : povray.binaries.images : Checker illusion : Re: Checker illusion Server Time
8 Aug 2024 12:26:04 EDT (-0400)
  Re: Checker illusion  
From: Slime
Date: 12 Jul 2005 02:03:02
Message: <42d35d16$1@news.povray.org>
> The illusion is not new to me. But the thing is, that how did you do it
with
> pov-ray?!?
> By trial and error (I hope not)? :)

I just had to make sure that POV-Ray's lighting calculations would create
the same colors. So I wanted

dark square color * (light source color * cos(angle to light) * surface
diffuse + surface ambient) = light square color * surface ambient

To simplify this, I made the light source color 1/cos(angle to light):

dark square color * (surface diffuse + surface ambient) = light square color
* surface ambient

I also required that the diffuse + ambient = 1:

dark square color = light square color * surface ambient

So then I was able to choose any diffuse/ambient values as long as they
summed to 1, and as long as the dark square color was the same as the light
square color times the ambient value.

I guess I made this seem pretty complicated. in my head it was a lot
simpler, like "If I make sure the amount of light hitting the surface is
exactly 1, and the color of the dark square is the same as the ambient
light, it will work."

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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