[X, Y, Z] = meshgrid(linspace(-pi, pi));
C = sin(X).*cos(Y) + sin(Y).*cos(Z) + sin(Z).*cos(X);
isosurface(X, Y, Z, C, 0.4)
xlabel('X'); ylabel('Y'); zlabel('Z');
isosurface(X, Y, Z, C, 0.6);
isosurface(X, Y, Z, C, 0.8);
legend({'c = 0.4', 'c = 0.6', 'c = 0.8'})
I do not understand about the solid domain. Maybe...
mask = -0.4 < C & C < -0.4;
isosurface(X, Y, Z, C04, 0.4)
isosurface(X, Y, Z, C, 0.4)
xlabel('X'); ylabel('Y'); zlabel('Z');
legend({'background', 'c = 0.4'})
isosurface(X, Y, Z, C04, 0.4);
isosurface(X, Y, Z, C, 0.6);
xlabel('X'); ylabel('Y'); zlabel('Z');
legend({'background', 'c = 0.6'});
isosurface(X, Y, Z, C04, 0.4)
isosurface(X, Y, Z, C, 0.8);
xlabel('X'); ylabel('Y'); zlabel('Z');
legend({'background', 'c = 0.8'});
... but I don't think that is quite right.
If the idea is that the entire area that is in the range -0.4 to +0.4 should be filled in, then that is a bit tricky. MATLAB doesn't really do filled 3D solids, other than by tracing their edge.
Maybe...
isosurface(X, Y, Z, C, -0.4)
isosurface(X, Y, Z, C, 0.4)
isosurface(X, Y, Z, C, 0.8);
xlabel('X'); ylabel('Y'); zlabel('Z');
legend({'c = -0.4', 'c = 0.4', 'c = 0.8'});
and "understand" that between -0.4 and +0.4 is filled?