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

**URL:** <https://community.wolfram.com/t/plot-the-solution-of-numerical-equation-in-3d-on-a-sphere-surface/1087>\
**Category:** Questions\
**Tags:** demonstrations, mathematica, graphics-and-visualization\
**Created:** [December 11, 2013, 6:06am UTC](https://community.wolfram.com/t/plot-the-solution-of-numerical-equation-in-3d-on-a-sphere-surface/1087 "2013-12-11T06:06:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtminerva](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rtminerva](https://community.wolfram.com/u/rtminerva)\
**Post date:** [December 11, 2013, 6:06am UTC](https://community.wolfram.com/t/plot-the-solution-of-numerical-equation-in-3d-on-a-sphere-surface/1087/1 "2013-12-11T06:06:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![seanc](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/seanc/32/34005_2.png) [@seanc](https://community.wolfram.com/u/seanc)\
**Post date:** [December 22, 2013, 9:43am UTC](https://community.wolfram.com/t/plot-the-solution-of-numerical-equation-in-3d-on-a-sphere-surface/1087/2 "2013-12-22T09:43:35Z")

</div>

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](http://reference.wolfram.com/mathematica/ref/ParametricPlot3D.html). 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.

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [December 22, 2013, 9:54am UTC](https://community.wolfram.com/t/plot-the-solution-of-numerical-equation-in-3d-on-a-sphere-surface/1087/3 "2013-12-22T09:54:56Z")

</div>

As a starting point take a look at this Demonstration:

[**Lissajous Patterns on a Sphere Surface**](http://demonstrations.wolfram.com/LissajousPatternsOnASphereSurface/)

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

 ![sdf976g78df5g67g5675v765d7sa.jpg](https://global.discourse-cdn.com/wolfram/original/3X/5/3/537d8a0901d279dc50143d736c20d6715b227ca3.jpeg)

```auto
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]

```
