Surface plotting problem in Mathematica

In summary, AzOHello found that by re-splitting the plot on either side of zero, he was able to get a better result with ParametricPlot3D.
  • #1
AzO
3
0
Hi!

I would like to plot a so called breathersurface in Mathematica, but it gives a really bad picture, which I do not really want to use in my thesis:
http://www.cs.elte.hu/~azo/Breathersurface.JPG" [Broken]
As you can see, it has holes in it, while it should not have. I used here PlotPoints->{50,50}, but after this I tried PlotPoints->{400,400}... My computer almost died during the calculations, but after 4 hours of processing :) it gave me a similar picture, with holes..
Than I have got the idea to tell Mathematica to use << Version5`Graphics`. I have got a perfect picture:
http://www.cs.elte.hu/~azo/BreathersurfaceOld.JPG" [Broken]
So I do not understand why is this so. I really would like to use Version7 Graphics, because until now every figure was made with that, and it is nicer :).

AzO
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Hello,
Can you provide us with your notebook ? So that we can try and play with it ? Is it a ContourPlot3d[] ? :smile:
 
  • #3
Of course!

http://www.cs.elte.hu/~azo/BreathersurfacePhysicsforum.nb" [Broken]

No, it is a ParamterciPlot3D[].
 
Last edited by a moderator:
  • #4
Sorry, I had to go somewhere :smile:
I think there's a problem with spurious imaginary part in the final result. Taking a Chop[] or a Re[] of r12 improve the situation a bit but there's still holes. Using MaxRecursion improve a little bit more the situation…
Basically, if your final result has a remaining imaginary part it will not be plotted. Although this is not the only reason since taking the Re[] of r12 do not solve completely the issue.
I tried to find info on the possible value of the Method option passed to ParametricPlot3D to no avail…
It's frustrating that the Version5`Graphics` handles it like a charm…
 
  • #5
Hi. I think you're running into branch-cut problems with the complex arctan function. Below I define teta1 in it's logarithmic form:

teta1[x_, t_, b_] := I*Log[(I + Exp[khi[x, t, b]])/(I - Exp[khi[x, t, b]])];

split up the plot on either side of zero then combine:

pp1 = ParametricPlot3D[
Evaluate[Re[r12[x, t, (3 - 4*I)/5, (3 + 4*I)/5]]],
{t, 0.001, 5*Pi}, {x, -10, 10}, ImageSize -> {600, 600},
PlotRange -> {{-4, 4}, {-4, 4}, {-5, 5}}]
pp2 = ParametricPlot3D[
Evaluate[Re[r12[x, t, (3 - 4*I)/5, (3 + 4*I)/5]]],
{t, -0.001, -5*Pi}, {x, -10, 10}, ImageSize -> {600, 600},
PlotRange -> {{-4, 4}, {-4, 4}, {-5, 5}}]
Show[{pp1, pp2}]

probably needs some more work to get it just right. Interesting phenomenon. Thanks.:)
 
  • #6
Jackmell! You are really good!
I should have thought to the branch cut problem myself. Now that you've said it, it looked obvious. Your solution works perfectly!
Thank you very much! :)))
 

1. What is a surface plotting problem in Mathematica?

A surface plotting problem in Mathematica refers to difficulties encountered when trying to create a visual representation of a three-dimensional surface using the software program Mathematica. This can include issues with data formatting, incorrect function syntax, or unexpected results.

2. How do I fix a surface plotting problem in Mathematica?

To fix a surface plotting problem in Mathematica, first check that your data is in the correct format and that your function is written correctly. You can also try adjusting the range and resolution of your plot, or using different plot options. If the issue persists, consulting the Mathematica documentation or seeking help from online forums or Mathematica experts may be helpful.

3. Why is my surface plot in Mathematica not displaying properly?

There could be several reasons why your surface plot in Mathematica is not displaying properly. Some common issues include incorrect function syntax, missing or incorrect data, or a limited plot range. It is also possible that there is a problem with your Mathematica installation or graphics settings.

4. How can I improve the quality of my surface plot in Mathematica?

To improve the quality of your surface plot in Mathematica, you can adjust the plot options such as lighting, color, and shading. You can also increase the resolution of your plot or use different plot functions. Additionally, ensuring that your data is accurate and in the correct format can also improve the quality of your surface plot.

5. Can I export my surface plot from Mathematica to other software?

Yes, you can export your surface plot from Mathematica to other software such as MATLAB or Python. You can use the "Export" function in Mathematica to save your plot in a variety of file formats, including commonly used formats in other software. However, note that the appearance of your plot may vary slightly when exported to different software due to differences in rendering methods.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Advanced Physics Homework Help
Replies
6
Views
547
Back
Top