# Surface plotting problem in Mathematica

1. Apr 24, 2010

### AzO

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 << Version5Graphics. 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: May 4, 2017
2. Apr 24, 2010

### guerom00

Hello,
Can you provide us with your notebook ? So that we can try and play with it ? Is it a ContourPlot3d[] ?

3. Apr 24, 2010

### AzO

Of course!

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

No, it is a ParamterciPlot3D[].

Last edited by a moderator: May 4, 2017
4. Apr 24, 2010

### guerom00

Sorry, I had to go somewhere
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 Version5Graphics handles it like a charm…

5. Apr 24, 2010

### jackmell

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. Apr 25, 2010

### AzO

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! )