Message Boards Message Boards

3D Vector Field of a given function on a sphere

Posted 4 years ago

I want to plot vector fields on a sphere of a given function. Let's say that I have this function: equation of the vector function

Where a, b are radii of the spheres (known parameters), U is the applied voltage on the outer sphere (also, known). Obviously, the equation is in spherical coordinate system, with r the radial distance. It represent electric field, and how can I plot it on a sphere? I've tried with VectorPlot3D, but the results are not really accurate:try to plot the vector field Any help, tips and suggestions how can I plot the vectors which "follow" this equation? ( their intensity has to change as the applied voltage changes, as well as the radial distance of the sphere center )

Thanks!

POSTED BY: Stefan Naumoski

Hello, I am not sure if I understand your question, so please excuse my answer if I have misunderstood. How about something like this:

With[{points = SpherePoints[24], length = 10},
Manipulate[
Graphics3D[{{Yellow, Opacity[0.5], Sphere[{0, 0, 0}, 10 r]}, 
Arrow[Tube[{10 r #, 10 r # + # length/r^3}]] & /@ points}, 
PlotRange -> 40 {{-1, 1}, {-1, 1}, {-1, 1}}],
{{r, 1}, .5, 10}
]
]

I made the visualization sphere artificially large here, but that helps with the visualization I think.

POSTED BY: W. Craig Carter
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