MathGroup Archive 1997

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

Search the Archive

Re: Coloring Surfaces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9857] Re: Coloring Surfaces
  • From: "Xah" <xah at best.com>
  • Date: Sat, 29 Nov 1997 00:10:50 -0500
  • Organization: smtp.best.com
  • References: <65m996$ar9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <65m996$ar9 at smc.vnet.net>, eanog at TURING.UNICAMP.BR wrote:
>I want to combine 2  different surfaces with different colors
>...
>but when I combine ...
>the surfaces come up with just one color...

The problem with your code is that you used two sets of LightSources in
Show and expect each set sticking to one surface. LightSources are
exact that: light sources.  In particular, LightSources does not
specify the SurfaceColor.

Here's a solution to your problem. For explainations, please read the
message "Re: Coloring Graphics" posted around 11/25, which contains
explainations to another query almost exactly like yours.

Needs["Graphics`SurfaceOfRevolution`"];

s1=First at SurfaceOfRevolution[a^2,{a,3,5},DisplayFunction->Identity];
s2=First at SurfaceOfRevolution[a^2+4,{a,3,5},DisplayFunction->Identity];

Show[Graphics3D[{SurfaceColor[Hue[0]],s1,SurfaceColor[Hue[.7]],s2}],
  PlotRange->{{-5,5},{-2,5},{0,25}},AspectRatio->1];

 Xah, xah at best.com
 http://www.best.com/~xah/SpecialPlaneCurves_dir/specialPlaneCurves.html
 Mountain View, CA, USA
 "sed/awk/sh/(.+) -> Perl, Sucks still."


  • Prev by Date: EulerPhi[1]
  • Next by Date: Re: Re: Want to use Module
  • Previous by thread: Coloring Surfaces
  • Next by thread: Kronecker Delta