Combining RevolutionPlot3D plots for potentials inside and outside shells

2 replies · 4K views · last reply
gulfcoastfella
Gold Member
Messages
99
Reaction score
1
Hi,

I've been plotting potentials and electric fields inside and outside shells; when I create 2 separate RevolutionPlot3D plots for the potentials (1) inside the shell and (2) outside the shell, I'd like to combine them into one plot. I tried using the Show function, but Mathematica doesn't appear to like that route. Any ideas about how to combine the plots?

I've attached the 2 separate Mathematica plots as they exist at the moment.

On a separate note, is there a way to plot using RevolutionPlot3D with a piecewise function? This would bypass the above problem and skip straight to the solution.

Thanks...
 
Attachments
  • 3D surface plot titled Electric Potential Inside the Cylinder, showing a saddle-like surface with a central dip and raised edges, colored from blue to red, over axes from -1.0 to 1.0 and z from -0.2 to 0.2.
    inside.png
    13.5 KB · Views: 561
  • 3D surface plot titled Electric Potential Outside the Cylinder: a circular disk-shaped surface with concentric contour rings, z-axis ranging from -0.02 to 0.02, with a sharp central spike or ridge rising above the disk.
    outside.png
    9.5 KB · Views: 536
gulfcoastfella said:
Hi,

On a separate note, is there a way to plot using RevolutionPlot3D with a piecewise function? This would bypass the above problem and skip straight to the solution.

Thanks...

I've put the two different functions into a piecewise function, and then revolved a plot from that. The results are great... I just wish I knew why the plot doesn't show at r=1. (See attached)
 
Attachments
  • 3D surface plot titled "Electric Potential Inside & Outside the Cylinder" in Mathematica style, showing a radially symmetric surface with a flat central region and raised ridges at the rim, on axes ranging from -2 to 2 and -1.0 to 1.0.
    pw.png
    50.1 KB · Views: 562
gulfcoastfella said:
I tried using the Show function, but Mathematica doesn't appear to like that route. Any ideas about how to combine the plots?

Thanks...

I figured out that the range of Show defaults to that of the first plot, which would leave out most of the second plot in my case. So I used the option PlotRange->All and that fixed everything up...

pic of corrected curve is attached.

This has been a great monologue! Thanks for listening.

Chris
 
Attachments
  • 3D Mathematica surface plot titled Electric Potential Inside the Cylinder, showing a circular disk with contour lines and four pronounced peaks around the rim, with axes ranging from -2 to 2 and -1.0 to 1.0.
    PlotRange_All.png
    81.6 KB · Views: 588