Combining Mathematica Surface's of Revolution

  • Context: Mathematica 
  • Thread starter Thread starter gulfcoastfella
  • Start date Start date
  • Tags Tags
    Mathematica Revolution
Click For Summary
SUMMARY

The discussion centers on combining two separate RevolutionPlot3D plots in Mathematica for potentials inside and outside a shell. The user initially faced challenges using the Show function but resolved the issue by adjusting the PlotRange option to PlotRange->All, which allowed both plots to display correctly. Additionally, the user successfully created a piecewise function to streamline the plotting process, although they encountered a display issue at r=1. The conversation highlights effective techniques for visualizing complex functions in Mathematica.

PREREQUISITES
  • Familiarity with Mathematica software
  • Understanding of RevolutionPlot3D functionality
  • Knowledge of piecewise functions in Mathematica
  • Basic concepts of electric fields and potentials
NEXT STEPS
  • Explore advanced options in RevolutionPlot3D for custom visualizations
  • Learn about the Show function and its options in Mathematica
  • Investigate troubleshooting techniques for plot display issues in Mathematica
  • Study the implementation of piecewise functions in Mathematica for complex plotting
USEFUL FOR

Mathematica users, physicists, and engineers interested in visualizing electric fields and potentials, as well as anyone looking to enhance their plotting skills in Mathematica.

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

  • inside.png
    inside.png
    13.5 KB · Views: 529
  • outside.png
    outside.png
    9.5 KB · Views: 506
Physics news on Phys.org
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
    pw.png
    50.1 KB · Views: 532
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
    PlotRange_All.png
    81.6 KB · Views: 550

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
718
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K