Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1922

Re: Problem with "Point" light sources in Mathematica 7.01

From John Fultz <jfultz@wolfram.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Problem with "Point" light sources in Mathematica 7.01
Date 2011-04-30 09:51 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipgm3j$8p9$1@smc.vnet.net> (permalink)

Show all headers | View raw


Seems there's a problem with the use of ImageScaled for Point and Spot light
sources.  The problem has been reported.

FWIW, the value used for Lighting->Automatic, which was made to resemble the v5 
lighting system as closely as possible given the dramatic changes in the 
underlying rendering code, is:

{
  {"Ambient", RGBColor[{0.312,0.188,0.4}]},
  {"Directional",RGBColor[{0.8,0.,0.}],ImageScaled[{2,0,2}]},
  {"Directional",RGBColor[{0.,0.8,0.}],ImageScaled[{2,2,2}]},
  {"Directional",RGBColor[{0.,0.,0.8}],ImageScaled[{0,2,2}]}
}


Sincerely,

John Fultz
jfultz@wolfram.com
User Interface Group
Wolfram Research, Inc.


On Fri, 29 Apr 2011 16:47:54 +0500, Alexey Popkov wrote:
> Hello,
>
> I tried to reproduce the default styling of Plot3D of Mathematica 5 in
> Mathematica 7.01 and faced unexpected seemingly wrong behavior of "Point"
> light sources in version 7.
>
> Consider the following:
>
> v5Style = {{"Ambient", GrayLevel[0]}, {"Point", RGBColor[{1, 0., 0.}],
> ImageScaled[{2, 0, 2}]}, {"Point", RGBColor[{0., 1, 0.}],
> ImageScaled[{2, 2, 2}]}, {"Point", RGBColor[{0., 0., 1}],
> ImageScaled[{0, 2, 2}]}};
> Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, Lighting -> v5Style, Mesh -> 20]
>
> The plot generated by the above code is too dark. And the surface colors
> does not change when rotating the plot. It means that the "Point" light
> sources are fixed in the coordinate system and rotate with the plot.
>
> With "Directional" light sources the problem disappears but it is not the
> default lighting style of Mathematica 5:
>
> new = {{"Ambient", GrayLevel[0]}, {"Directional",
> RGBColor[{1, 0., 0.}], ImageScaled[{2, 0, 2}]}, {"Directional",
> RGBColor[{0., 1, 0.}], ImageScaled[{2, 2, 2}]}, {"Directional",
> RGBColor[{0., 0., 1}], ImageScaled[{0, 2, 2}]}};
> Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, Lighting -> new, Mesh -> 20]
>
> It seems that in the case of "Point" light sources we get wrong  light
> directions. Is there a way to avoid this?
>
> Alexey


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Problem with "Point" light sources in Mathematica 7.01 John Fultz <jfultz@wolfram.com> - 2011-04-30 09:51 +0000

csiph-web