MathGroup Archive 1998

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

Search the Archive

Re: Q: Graphics3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13400] Re: Q: Graphics3D
  • From: "P.J. Hinton" <paulh>
  • Date: Thu, 23 Jul 1998 03:32:43 -0400
  • Organization: Wolfram Research, Inc.
  • Sender: owner-wri-mathgroup at wolfram.com

On Mon, 20 Jul 1998, P.J. Hinton wrote:

> 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)?

Needs["Graphics`Shapes`"]

a=Graphics3D[
    TranslateShape[{SurfaceColor[RGBColor[1,0,0]],Sphere[]},{+1,0,0}]];

b=Graphics3D[
    TranslateShape[{SurfaceColor[RGBColor[0,1,0]],Sphere[]},{-1,0,0}]];

Show[{a,b}];

For more information, see _The Mathematica Book_ (Third Edition),
Section 2.9.12.  If you have access to the online documentation via the
Help Browser, you can evaluate the following command in a notebook to
open the Help Browser to the appropriate section.

FrontEndExecute[FrontEnd`HelpBrowserLookup[
    "MainBook", {"2.9.12", "12.10"}]]

--
P.J. Hinton
Mathematica Programming Group           paulh at wolfram.com Wolfram
Research, Inc.                  http://www.wolfram.com/~paulh/
Disclaimer: Opinions expressed herein are those of the author alone.



  • Prev by Date: Re: Space between different Cells
  • Next by Date: partially delayed evaluation
  • Previous by thread: Q: Graphics3D
  • Next by thread: Re: Q: Graphics3D