Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16212 > unrolled thread
| Started by | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| First post | 2013-11-12 04:29 +0000 |
| Last post | 2013-11-12 04:29 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: wrap a density plot on a sphere Bob Hanlon <hanlonr357@gmail.com> - 2013-11-12 04:29 +0000
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Date | 2013-11-12 04:29 +0000 |
| Subject | Re: wrap a density plot on a sphere |
| Message-ID | <l5sarm$dmn$1@smc.vnet.net> |
Did you create an interpolation function from your data?
data = Flatten[Table[{t, p, Sqrt[p^2 + t^2]},
{t, 0, 2 Pi, Pi/16}, {p, 0, Pi, Pi/32}], 1];
f = Interpolation[data];
SphericalPlot3D[1,
{t, 0, 2 Pi}, {p, 0, Pi},
ColorFunction ->
Function[{x, y, z, t, p, r}, Hue[f[t, p]]],
Mesh -> 10,
MeshFunctions ->
{Function[{x, y, z, t, p, r}, f[t, p]]}]
Comparing with the original function
SphericalPlot3D[1,
{t, 0, 2 Pi}, {p, 0, Pi},
ColorFunction ->
Function[{x, y, z, t, p, r}, Hue[Sqrt[p^2 + t^2]]],
Mesh -> 10,
MeshFunctions ->
{Function[{x, y, z, t, p, r}, Sqrt[p^2 + t^2]]}]
Bob Hanlon
On Mon, Nov 11, 2013 at 12:05 AM, Danny Barker <danny.barkan@gmail.com>wrote:
> Dear all
>
> I have a data set in the form of a list: {
> {Theta1,Phi1,f1},{Theta2,Phi2,f2}, ... } which i would like to present as a
> density/Contour plot on the surface of a sphere
>
> i read past posts and tried using
>
> SphericalPlot3D[1, {t, 0, 2 Pi}, {p, 0, Pi},
> ColorFunction -> Function[{x, y, z, t, p, r}, Hue[f[t, p]]],
> Mesh -> 10, MeshFunctions -> {Function[{x, y, z, t, p, r}, f[t, p]]}]
>
> but can't seem to get it right...
>
> thanks in advance for your help
>
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web