MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Modifying illumination shades

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24367] Modifying illumination shades
  • From: Bill Marks <bmarks at helix.nih.gov>
  • Date: Wed, 12 Jul 2000 23:13:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

The command
ListPlot3D[surface, LightSources-> ls, ViewPoint -> vp]
  produces a surface illuminated by the light sources supplied, 
whereas the command

ListPlot3D[surface, addedShades , LightSources-> ls, ViewPoint -> vp]
ignores the LightSources  option when I use it.

Since I want to add some surface colors "surfaceShades" to those 
determined by the illumination, I wrote my own illumination program, 
which returns "illumShades".
I then add my surface colors to them and use
ListPlot3D[surface, Apply[RGBColors, illumShades + surfaceShades, {2}], opts]

This works but my illumination program, though Compiled, is slower 
than one used by ListPlot3D.

One solution would be a function that returns the actual  shades used 
in ListPlot3D:
illumShades = MMAFunc[surface,  LightSources-> ls, ViewPoint -> vp],
which I would then modify.  I have been unable to get those shades.

Any suggestions? For example, is there a way to get the shades 
computed by ListPlot3D?

Bill Marks


The command

ListPlot3D[surface, LightSources-> ls, ViewPoint -> vp]

 produces a surface illuminated by the light sources supplied, whereas
the command 


ListPlot3D[surface, addedShades , LightSources-> ls, ViewPoint -> vp] 

ignores the LightSources  option when I use it.


Since I want to add some surface colors "surfaceShades" to those
determined by the illumination, I wrote my own illumination program,
which returns "illumShades".  

I then add my surface colors to them and use

ListPlot3D[surface, Apply[RGBColors, illumShades + surfaceShades, {2}],
opts] 


This works but my illumination program, though Compiled, is slower than
one used by ListPlot3D.


One solution would be a function that returns the actual  shades used
in ListPlot3D: 

illumShades = MMAFunc[surface,  LightSources-> ls, ViewPoint -> vp], 

which I would then modify.  I have been unable to get those shades.


Any suggestions? For example, is there a way to get the shades computed
by ListPlot3D?


Bill Marks



  • Prev by Date: Re: With[{software=Mathematica}, Frustration]
  • Next by Date: Re: define a new object or use the existing?
  • Previous by thread: HELP!! 3D --> 2D math problems..
  • Next by thread: Q: print without linefeed