Combining Mathematica Surface's of Revolution

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.
  • #1
gulfcoastfella
Gold Member
99
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: 479
  • outside.png
    outside.png
    9.5 KB · Views: 467
Mathematics news on Phys.org
  • #2
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: 472
  • #3
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: 492

Related to Combining Mathematica Surface's of Revolution

What is a surface of revolution in Mathematica?

A surface of revolution in Mathematica is a three-dimensional shape that is created by rotating a two-dimensional curve around an axis. It is a common technique used in mathematical and scientific visualizations.

How do I combine multiple surfaces of revolution in Mathematica?

To combine multiple surfaces of revolution in Mathematica, you can use the Graphics3D function and specify the individual surfaces using the RevolutionPlot3D function. You can also use the Show function to combine multiple graphics objects into one display.

Can I customize the appearance of a surface of revolution in Mathematica?

Yes, you can customize the appearance of a surface of revolution in Mathematica by specifying options such as color, opacity, and lighting in the RevolutionPlot3D function. You can also use the PlotStyle option to change the surface's material, texture, or mesh.

How do I rotate a surface of revolution in Mathematica?

To rotate a surface of revolution in Mathematica, you can use the Rotate function and specify the rotation angle and axis. Alternatively, you can use the interactive Manipulate function to dynamically rotate the surface using sliders.

Can I export a surface of revolution from Mathematica to other software?

Yes, you can export a surface of revolution from Mathematica to other software such as MATLAB, Blender, or Unity. You can use the Export function and specify the desired file format, such as OBJ or STL. You can also use the Graphics3D function to generate an interactive 3D object that can be exported as a standalone file.

Similar threads

  • General Math
Replies
3
Views
5K
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
1
Views
651
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
959
Back
Top