Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Plot3D Artifact??' topicStudent Support Forum > General > "Plot3D Artifact??"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
12/22/12 11:52am

I haven't figured it out, but I have a fix and a guess. This cures the artifact:

InputInitialPlot =
Plot3D[Chop@InputInitial[x, y], {x, 0, gelWidth}, {y, 0, gelLength},
PlotRange -> All, PlotPoints -> 100]

I suspect there is some sort of floating point issue with the front end in the purple band. I thought the error might have been in computing the surface normals. You can reproduce the purple band artificially by reversing the direction of the surface normal like this

normals :=
Function[{x, y, z},
If[15 < Norm[{x - sourceX, y - sourceY}] < 20, {0, 0, -1}, {0, 0,
1}]];
InputInitialPlot =
Plot3D[0, {x, 0, gelWidth}, {y, 0, gelLength},
NormalsFunction -> normals, PlotRange -> All, PlotPoints -> 50]

However, making the normal {0, 0, 1} at all points away from the spike doesn't make the purple band go away in your original plot. It is possible that the front end gets confused about which side of the polygons is up, but that seems unlikely to me since the differences in the x and y coordinates are not very small.

You can increase WorkingPrecision, but it doesn't seem to make any difference. I think WorkingPrecision only affects the kernel, which supports the idea that the issue is with the front end.

Note also if you add 1 to your function,

Plot3D[1 + InputInitial[x, y], ...]

the purple band does not appear. So it's almost certainly a floating point issue. You can see a similar issue in other plots where the function gets very small:

Plot3D[1/(x^2 + 4 y^2)^95, {x, -50, 50}, {y, -50, 50},
PlotPoints -> 31, PlotRange -> {0, 1}]


URL: ,

Subject (listing for 'Plot3D Artifact??')
Author Date Posted
Plot3D Artifact?? PenguinABox 12/18/12 09:25am
Re: Plot3D Artifact?? Michael 12/22/12 11:52am
Re: Re: Plot3D Artifact?? jf 12/22/12 7:12pm
Re: Plot3D Artifact?? Forum Modera... 12/27/12 12:45pm
Re: Plot3D Artifact?? PenguInABox 12/28/12 05:21am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic