Message Boards Message Boards

0
|
9266 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Plot the solution of numerical equation in 3D on a sphere surface

Posted 11 years ago
I have a problem in making a graph on sphere surface. I get the solution from numerical simulation and it shows the solution is written in interpolation function. let`s say the function is X(t,x,y,z). What I would like to do is to make a graph this function on sphere surface. Please tell me weather it is possible to do that and how.

Thanks.
POSTED BY: Dhisa Minerva
2 Replies
As a starting point take a look at this Demonstration:

Lissajous Patterns on a Sphere Surface

The source code is free and you can download it from that link. But it is also rather short so I give it below.




 Manipulate[
  Module[{\[Theta] =
     azf \[Pi]/2 Cos[a t + \[Phi]], \[CurlyPhi] = \[Pi] -
      pof \[Pi] Cos[b t]},
   Show[ParametricPlot3D[{Cos[\[CurlyPhi]] Cos[\[Theta]],
      Cos[\[Theta]] Sin[\[CurlyPhi]], Sin[\[Theta]]}, {t, 0, tmax},
     PlotStyle -> Thickness[thick], ColorFunction -> cofu,
     PerformanceGoal -> "Quality", PlotPoints -> Round[3/7 tmax + 100]],
    Graphics3D[{sphco, Opacity[op], Specularity[.5, 20],
     Sphere[{0, 0, 0}, 1]}], SphericalRegion -> True,
   Background -> bgrco, Boxed -> False, Axes -> False,
   ViewAngle -> .31, ImageSize -> {420, 420}, PlotRange -> 1,
   ViewPoint -> {1.1671864955891427`, -0.6038252372177897`,
     3.1181838892876774`}, BoxRatios -> {1, 1, 1}]],
"curve color",
{{cofu, 52, ""},
  Dynamic[# ->
      Show[ColorData[#, "Image"], ImageSize -> 100] & /@ (ColorData[
       "Indexed"]~Join~ColorData["Gradients"])],
  ControlType -> PopupMenu},
"sphere color",
{{sphco, RGBColor[0., 0.9678, 1.], ""}, GrayLevel[.3],
  ImageSize -> Small},
"background color",
{{bgrco, RGBColor[0.2727, 0., 0.08798], ""}, GrayLevel[.3],
  ImageSize -> Small},
Grid[Transpose[{{"a-factor",
     Control[{{azf, 1, ""}, Range[5]}]},
    {"p-factor",
     Control[{{pof, 1, ""}, Range[5]}]}}]],
"azimuthal frequency",
{{a, 4.01, ""}, 1, 5, Appearance -> "Labeled", ImageSize -> Small},
"polar frequency",
{{b, 3.61, ""}, 1, 5, Appearance -> "Labeled", ImageSize -> Small},
"relative phase",
{{\[Phi], 0, ""}, 0, 2 Pi, Appearance -> "Labeled",
  ImageSize -> Small},
"curve length",
{{tmax, 100, ""}, 0.1, 500, Appearance -> "Labeled",
  ImageSize -> Small},
"curve thickness",
{{thick, .005, ""}, 0, .05, Appearance -> "Labeled",
  ImageSize -> Small},
"sphere opacity",
{{op, 0.31, ""}, 0, 1, Appearance -> "Labeled", ImageSize -> Small},
ControlPlacement -> Left]
POSTED BY: Vitaliy Kaurov
Yes, it is possible to do this, but it requires some programming.

The answer to this depends on how you want to project the 3D curve onto the 2D surface of the sphere.  Can you explain how you would like the curve projected onto the sphere?

The easiest way to do this is to calculate parameteric function that represents the projection of the curve onto the surface and then to use ParametricPlot3D. Please make sure you are familiar with this function.

If possible, please give a very simple example of your problem and let us know how far you have gotten on solving it.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract