MathGroup Archive 1998

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

Search the Archive

Re: Q: Graphics3D


Hi Ulf,

general to color surfaces You must use the SurfaceColor[] primitive. The
following shows Your colored spheres:

Show[Graphics3D[
    {{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 mpipks-dresden.mpg.de> To: mathgroup at smc.vnet.net
Subject: [mg13396] [mg13320] Q: Graphics3D


>Hello,
>
>using the following functions 
>
>-------------------------------------------------
>Needs["Graphics`Shapes`"];
>
>SetOptions[Graphics3D,LightSources->{}];
>
>a=Graphics3D[TranslateShape[Sphere[],{+1,0,0}],
>             AmbientLight->RGBColor[1,0,0]];
>b=Graphics3D[TranslateShape[Sphere[],{-1,0,0}],
>             AmbientLight->RGBColor[0,1,0]];
>
>Show[{a,b}];
>-------------------------------------------------
>
>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 mpipks-dresden.mpg.de)
>
>



  • Prev by Date: Gaussian Elimination wont work in my example
  • Next by Date: Re: Math3.0 OptionInspector | NotebookOptions | PrintingOptions | Headers --> all 'None' keeps printing headers. HELP
  • Previous by thread: Re: Q: Graphics3D
  • Next by thread: Re: Q: Graphics3D