MathGroup Archive 1997

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

Search the Archive

How to draw a shaded shpere?

  • To: mathgroup at
  • Subject: [mg8060] How to draw a shaded shpere?
  • From: juana at (MORENO JUANA)
  • Date: Mon, 4 Aug 1997 01:47:43 -0400
  • Organization: ICTP-Trieste-Italy
  • Sender: owner-wri-mathgroup at

	I want to draw a sphere shaded according to a particular function. 
I need a lot of points to appreciate the behavior of that function.
I tried in two ways:

	-Using Plot3D and the options Mesh->False and PlotPoints->100.
The quality is good but I can draw only half a sphere and the borders
look bad.

	- Using ParametricPlot3D. In this case I can plot the whole sphere, 
but in order to get good quality I should increase the number of points. 
When I do that the result is that nothing can be seen,
because the "mesh" cover the sphere and hide the features of the function 
I want to visualize.

	Do you have a good trick to get a whole sphere with a nice shading
and not disturbing "mesh"?

	I am including the two macros I have used in order you can better
understand the problem.

	Thanks a lot,
			Juana Moreno

Using Plot3D:

shade=15*(1-kz2)*(1 + 15*kz2)/64
sp= Plot3D[{kz,GrayLevel[shade]},{kx,-one,one},{ky,-one,one},PlotPoints->100,
Mesh-> False,BoxRatios->{1,1,0.5}, Axes->False,Boxed->False,

Using ParametricPlot3D:

kx=Sin[theta] Cos[phi]
ky=Sin[theta] Sin[phi]
{phi,0 , 2 Pi},PlotPoints->{50,50},Axes->False,Boxed->False,Lighting->False]

  • Prev by Date: Combining ListPlots
  • Next by Date: Book Announcement
  • Previous by thread: Re: Re: Combining ListPlots
  • Next by thread: Re: How to draw a shaded shpere?