Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: plot data points onto sphere

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48030] Re: plot data points onto sphere
  • From: Sampo Smolander <sampo.smolander+newsnspam at helsinki.fi>
  • Date: Sat, 8 May 2004 01:23:35 -0400 (EDT)
  • Organization: University of Helsinki
  • References: <c7fi6d$od7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Michael <michael.john at ch.tum.de> wrote:
> Hi, I would like to plot data points (theta, phi) from a list onto the
> surface of a sphere, generated with SphericalPlot3D. Does anyone know
> how to do that with mathematica? There was a related entry from Peter
> Lundberg, yet without response.

This is a primitive way:

Needs["Graphics`ParametricPlot3D"]
pic1 = SphericalPlot3D[1, {theta, 0, Pi}, {phi, 0, 2Pi}]
data = Table[{ArcCos[Random[]*2 - 1], Random[]*2*Pi}, {100}];
fun1[{theta_, phi_}] := {Sin[theta]Cos[phi],Sin[theta]Sin[phi],Cos[theta]}
pic2 = Graphics3D[{PointSize[0.05], Map[Point[fun1[#]]&, data]}]
Show[pic1, pic2]

You may get some funny graphical artefacts because of the way the
points and the polygons of the sphere inter(lace?,vene?).
Ways to avoid that would make another story.

-- 
Sampo Smolander


  • Prev by Date: Re: plot data points onto sphere
  • Next by Date: Re: Building List
  • Previous by thread: Re: plot data points onto sphere
  • Next by thread: Simple question