Mathematica Surface plotting problem in Mathematica

AI Thread Summary
The discussion centers on a user's difficulty in plotting a breathersurface in Mathematica, which results in a flawed image with holes. Despite increasing PlotPoints to 400, the issue persisted, prompting the user to revert to Version 5 graphics, which produced a satisfactory result. It was suggested that the problem might stem from spurious imaginary parts in the data, and using functions like Chop[] or Re[] could help, though not entirely resolve the issue. Another participant identified branch-cut problems with the complex arctan function as a potential cause and proposed a method to split the plot around zero, which successfully improved the output. The user expressed gratitude for the solution, highlighting the collaborative nature of the discussion.
AzO
Messages
3
Reaction score
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"
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"
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
Hello,
Can you provide us with your notebook ? So that we can try and play with it ? Is it a ContourPlot3d[] ? :smile:
 
Of course!

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

No, it is a ParamterciPlot3D[].
 
Last edited by a moderator:
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…
 
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.:)
 
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! :)))
 

Similar threads

Replies
3
Views
5K
Replies
3
Views
2K
Replies
1
Views
2K
Replies
3
Views
3K
Replies
2
Views
2K
Replies
1
Views
7K
Back
Top