%% Control Resolution of Implicit Surface Plot
% Control the resolution of an implicit surface plot by using the 'MeshDensity' option. Increasing 'MeshDensity' can make smoother, more accurate plots while decreasing 'MeshDensity' can increase plotting speed.
% Divide a figure into two by using subplot. In the first subplot, plot the implicit surface \sin(1/(x y z)). The surface has large gaps. Fix this issue by increasing the  'MeshDensity' to 40 in the second subplot. fimplicit3 fills the gaps showing that by increasing 'MeshDensity' you increased the resolution of the plot.

syms x y z
f = sin(1/(x*y*z));

subplot(2,1,1)
fimplicit3(f)
title('Default MeshDensity = 35')

subplot(2,1,2)
fimplicit3(f,'MeshDensity',40)
title('Increased MeshDensity = 40')

% Copyright 2012 The MathWorks, Inc.