Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Q: Graphics3D

  • To: mathgroup at
  • Subject: [mg13441] Re: Q: Graphics3D
  • From: "Allan Hayes" <hay at>
  • Date: Fri, 24 Jul 1998 01:45:30 -0400
  • References: <6p6p5s$>
  • Sender: owner-wri-mathgroup at

Just a little extra to your suggestion:

>    {{SurfaceColor[RGBColor[1,0,0]],TranslateShape[Sphere[],{1,0,0}]},
>      {SurfaceColor[RGBColor[0,1,0]],TranslateShape[Sphere[],{-1,0,0}]}}
>   ]]

To avoid the spheres showing that the different colors are coming from
lights at different positions (defaults, LightSources
    -> {{{1.,0.,1.},RGBColor[1,0,0]},{{1.,1.,1.},
        RGBColor[0,1,0]},{{0.,1.,1.},RGBColor[0,0,1]}} )

We can, for example,can get the effect of a white light at {1.,1.,1.} by
placing all the light sources at this point:

], LightSources
    -> {{{1.,1.,1.},RGBColor[1,0,0]},{{1.,1.,1.},


Allan Hayes
Training and Consulting
Leicester UK
hay at
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642

Jens-Peer Kuska wrote in message <6p6p5s$5fs at>...
>Hi Ulf,
>general to color surfaces You must use the SurfaceColor[] primitive. The
>following shows Your colored spheres:
>    {{SurfaceColor[RGBColor[1,0,0]],TranslateShape[Sphere[],{1,0,0}]},
>      {SurfaceColor[RGBColor[0,1,0]],TranslateShape[Sphere[],{-1,0,0}]}}
>   ]]
>To question (1)
>The default surface color of Mathematica objects is white.  AmbientLight
>is a undirected enviroment light, and if You  look onto a white body
>with a red light it looks red. If You look at a white body with green
>light it looks green.  Thats why You see a red and a green sphere in
>Your a and b graphics. If You combine two graphics objects the options
>for display are taken from the first graphics object. So the
>combination uses the red ambient light of  graphics a and the two white
>spheres look red.
>Hope that helps
>  Jens
>-----Original Message-----
>From: Ulf Saalmann <us at> To: mathgroup at
To: mathgroup at
>Subject: [mg13441] [mg13320] Q: Graphics3D
>>using the following functions
>>             AmbientLight->RGBColor[1,0,0]];
>>             AmbientLight->RGBColor[0,1,0]];
>>Mathematica shows two red spheres.
>>(1) Why I don't get a red and green one?
>>(2) How to obtain a red and green one (with Lightning->True)?
>>Thanks for any help.    Ulf (us at

  • Prev by Date: Re: tag Times protected??
  • Next by Date: Re: Install[] and command line args?
  • Previous by thread: Re: Q: Graphics3D
  • Next by thread: Conditions on patterns in Flat functions