Re: Mathematica Lightning Model?
- To: mathgroup at smc.vnet.net
- Subject: [mg14742] Re: Mathematica Lightning Model?
- From: Martin Kraus <mkraus at theorie3.physik.uni-erlangen.de>
- Date: Thu, 12 Nov 1998 02:17:41 -0500
- Organization: Regionales Rechenzentrum Erlangen, Germany
- References: <72bdtl$k11@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Alexander Otte wrote: > > Hi! > > How can it be, that the shading of an object depends on the distance > between object and viewer? > > The following line of code shows the problem: > > Plot3D[Sin[x] Cos[y],{x,0,2 Pi},{y,0,2 Pi}, > > LightSources->{{{1,0,1},RGBColor[1,0,0]}},ViewPoint->1000{1.3,-2.4,2.0}] > > The surface is rendered with a single color. Even if an object is far > away - should't the intensity of diffuse reflected light depend on the > angle between the surface normals and the direction of light? > > So what kind of lightning model (lightning equation) does Mathematica > use? > > Thanks > > Alex Hi, as far as I understand, the problem is that the ViewPoint vector is not properly normalized in the calculation of shadings. For long ViewPoint vectors this leads to a squeezing of the graphics in the direction of the ViewPoint vector with respect to the lightning. Therefore, the graphics in your case are shaded as if they were flat; thus, they are uniformly colored. This is a known bug. Hopefully it will be corrected somewhen. Greetings Martin Kraus