# Mathematica geometric plot issue

My first introdcution in mathematica resulted in following plot

Plot3D[(((-0.0023x^2+0.525x+1 )^2)((1-(((z)^2)/((12-((0.0006(180-x)^2-
0.1118*(180-x)+1)) )^2)))^0.5)),{x,0,180},{z,0,16},AspectRatio ->Automatic]


however the result gives me Plot issue. attached the out[] file

Looking for advice on how to solve these mesh issues at different small spots indicated in white. What did i overlooked from math point of view ?

• Try: Plot3D[(1 + 0.525 x - 0.0023 x^2)^2 (1 - z^2/(11 + 0.1118 (180 - x) - 0.0006 (180 - x)^2)^2)^0.5, {x, 0, 180}, {z, 0, 17}, AspectRatio -> Automatic, PlotPoints -> 100] Commented Mar 31, 2018 at 17:29
• In addition to increasing the PlotPoints recommend that you use MaxRecursion->5 Commented Mar 31, 2018 at 17:49
• Appreciated a lot Commented Mar 31, 2018 at 18:11
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Apr 1, 2018 at 2:52
• Cross-posted: community.wolfram.com/groups/-/m/t/1312327 Commented Apr 3, 2018 at 17:47

Plot3D, because it samples only in the domain-plane (the xz-plane in the OP), has trouble resolving surfaces with tangents perpendicular to the domain-plane. For functions whose gradients are not very large, Plot3D is usually superior to ContourPlot3D, but in this case, I think ContourPlot3D works better.

Even with the suggestions of PlotPoints -> 100 and MaxRecursion -> 5, there are still some tiny but visible glitches in the surface mesh:

Plot3D[(((-0.0023 x^2 + 0.525 x + 1)^2) *
((1 - (((z)^2)/((12 - ((0.0006 (180 - x)^2 - 0.1118*(180 - x) + 1)))^2)))^(1/2))),
{x, 0, 180}, {z, 0, 16},
PlotPoints -> 100, MaxRecursion -> 5, AspectRatio -> Automatic,
AxesLabel -> Automatic, ImageSize -> Medium,
ViewPoint -> {3.215347035920252, 0.7760554973318896, 0.7136394773692102}
] // AbsoluteTiming


It is also necessary to square both sides to get rid of the square root. (Sampling outside its domain and possibly rounding errors result in negative numbers under the radical, which causes ContourPlot3D trouble in resolving the surface.)

ContourPlot3D[y^2 == (((-0.0023 x^2 + 0.525 x + 1)^2)^2 *
((1 - (((z)^2)/((12 - ((0.0006 (180 - x)^2 - 0.1118*(180 - x) + 1)))^2))))),
{x, 0, 180}, {z, 0, 16}, {y, 0, 958.5},
MeshFunctions -> {#1 &, #2 &},
MaxRecursion -> 2, BoxRatios -> {1., 1., 0.4}, ImageSize -> Medium,
ViewPoint -> {3.215347035920252, 0.7760554973318896, 0.7136394773692102}
] // AbsoluteTiming


• Amazing Feedback - the combination of Contourplot , Y square , the level of detail. Appreciated Your contribution a lot. Commented Apr 2, 2018 at 10:17
• @user1542889 You're welcome! Commented Apr 3, 2018 at 17:48