# Combining Mathematica Surface's of Revolution

• gulfcoastfella
In summary, the conversation discusses the challenge of combining two separate RevolutionPlot3D plots for potentials inside and outside a shell. The solution is to use a piecewise function for plotting, which bypasses the issue and results in a successful plot. The use of the Show function and the concept of plot range are also mentioned as important factors in creating a successful plot. The conversation ends with gratitude for the opportunity to share and discuss the topic.

#### gulfcoastfella

Gold Member
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

• inside.png
13.5 KB · Views: 469
• outside.png
10.9 KB · Views: 456
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

• pw.png
53.8 KB · Views: 459
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

• PlotRange_All.png
86.9 KB · Views: 481