MathGroup Archive 2005

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

Search the Archive

Re: Spherical density visualization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53305] Re: [mg53292] Spherical density visualization
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 5 Jan 2005 01:21:24 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

kj,

Here is an example solution for side by side animations.

Needs["Graphics`Colors`"]
Needs["Graphics`Animation`"]

f1[\[Theta]_, \[Phi]_] := (Sin[\[Theta]]*Sin[\[Phi]])^2
f2[\[Theta]_, \[Phi]_] := (Sin[2*\[Theta]]*Sin[\[Phi]/2])^2

plot1[\[Alpha]_] :=
    ParametricPlot3D[{Sin[\[Theta]]Cos[\[Phi] + \[Alpha]],
        Sin[\[Theta]]Sin[\[Phi] + \[Alpha]],
        Cos[\[Theta]], {EdgeForm[Gray],
          Hue[f1[\[Theta], \[Phi]]]}}, {\[Theta], 0, \[Pi]}, {\[Phi], 0,
        2\[Pi]},
      PlotPoints -> {41, 41},
      PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}1.2,
      Lighting -> False,
      Axes -> False,
      Boxed -> False,
      DisplayFunction -> Identity,
      SphericalRegion -> True,
      Background -> Linen,
      ImageSize -> 450];

plot2[\[Alpha]_] :=
    ParametricPlot3D[{Sin[\[Theta]]Cos[\[Phi] + \[Alpha]],
        Sin[\[Theta]]Sin[\[Phi] + \[Alpha]],
        Cos[\[Theta]], {EdgeForm[Gray],
          Hue[f2[\[Theta], \[Phi]]]}}, {\[Theta], 0, \[Pi]}, {\[Phi], 0,
        2\[Pi]},
      PlotPoints -> {41, 41},
      PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}1.2,
      Lighting -> False,
      Axes -> False,
      Boxed -> False,
      DisplayFunction -> Identity,
      SphericalRegion -> True,
      Background -> Linen,
      ImageSize -> 450];

frame[\[Alpha]_] :=
    Show[Graphics[
        {Rectangle[{0, 0}, {1, 1}, plot1[\[Alpha]]],
          Rectangle[{1.1, 0}, {2.1, 1}, plot2[\[Alpha]]],
          Text["Comparison of Two Spherical Functions", {1.05, 1.4}],
          Text[f1[\[Theta], \[Phi]], {0.5, 1.1}],
          Text[f2[\[Theta], \[Phi]], {1.6, 1.1}]}],
      AspectRatio -> Automatic,
      Frame -> False,
      PlotRange -> {{-0.1, 2.2}, {-0.1, 1.5}},
      Background -> PowderBlue,
      ImageSize -> 600];

Animate[frame[\[Alpha]], {\[Alpha], 0, 2\[Pi] - 2\[Pi]/24, 2\[Pi]/24}]
SelectionMove[EvaluationNotebook[], All, GeneratedCell]
FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5];
FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1,
      AnimationDirection -> Forward]}]

For a static presentation you could show two frames or make a map
projection.

If you want a personal, more timely reply give me a direct address.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: kj [mailto:socyl at 987jk.com.invalid]
To: mathgroup at smc.vnet.net


I have a family of probability density functions (actually they
are empirically measured frequencies) over S^2 (the surface of a
sphere).  I am searching for visually effective ways to display
and compare these functions.

One possibility would be to use color (or grayscale density) over
the surface of a sphere, and rely on software that allows simulating
the rotation of the sphere in 3-D (I believe there's a Mathematica
package to do this).  This would work OK for single function, but
for comparing more than one it is not great, unless it were possible
to simultaneously control the rotation of several spheres around
their respective centers through the same motion of the mouse.

Even with this capability, a visualization scheme that requires
the use of a computer is less than ideal, since ultimately I'll
have to publish some of these distributions on a printed page.
Therefore, I'm most interested in static representation schemes.
Everything that I've found so far is geared towards the problem of
representing distributions over the surface of the Earth, and relies
on specific properties of this problem (e.g. the location of
continents) that are inapplicable to my problem.

Anyway, any pointers would be most welcome!

kj

--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.




  • Prev by Date: Re: Spherical density visualization
  • Next by Date: Re: Re: Re: Re: Slowdown
  • Previous by thread: Re: Spherical density visualization
  • Next by thread: Shuffling 10^8 numbers: memory problems