Re: Q: Graphics3D
- To: mathgroup at smc.vnet.net
- Subject: [mg13396] Re: [mg13320] Q: Graphics3D
- From: "Jens-Peer Kuska" <kuska at linmpi.mpg.de>
- Date: Thu, 23 Jul 1998 03:32:39 -0400
- Sender: owner-wri-mathgroup at wolfram.com
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)
>
>