I am using Mathematica to plot the total potentials (which is the sum of an attractive potential field and a repulsive potential field) - This is related the Artificial Potential Field Method in Motion Planning, for example, see Wikipedia.
The attractive potential is "downhill" like a bowl and the repulsive potential is "uphill" ("spike")
I have attached the output for two cases (each case has two different viewing angles).
The first two figures are Case 1 and the last two are Case 2.
I prefer Case 2 (the last two figures) to which I have added to the Plot3D command:
ClippingStyle -> None
My problem is with the repulsive potential (the spike). There appears to some sort of "messy cylinder" (maroon in color) going through the entire spike. This is visible in View 2 of each case.
Is there anyway I can get rid of the cylinder by adding some options to Plot3D?
Edit Given below is the code for generating the plot.
(*Assignments*)
r = 0.5;
q = 1;
xmax = 70;
ymax = 70;
o[1, 1] = 25; o[1, 2] = 30;
A[1] = 3; B[1] = 4;
p1 = 35; p2 = 35;
(*This parameter can be changed, where g[l]>0*)
Table[g[l] = 1000, {l, 1, q}];
(*Function definitions*)
H = 1/2 ((x - p1)^2 + (y - p1)^2);
Table[EO[l] = 1/2 (((x - o[l, 1])/(A[l] + r))^2 + ((y - o[l, 1])/(B[l] + r))^2 - 1),{l, 1, q}];
(*We require the plot of the following function*)
L = H + Sum[g[l]/EO[l], {l, 1, q}];
(*The plot*)
Plot3D[L, {x, 0, xmax}, {y, 0, ymax}, ColorFunction -> "Rainbow", Mesh -> None, PlotStyle -> Directive[Opacity[5]], ClippingStyle -> None]