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

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:3+2 =



Original Message (ID '181723') By Michael:
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}]