function [inside, val] = fig(x,y,z)
% INPUT: x - 1st coordinate vector
%        y - 2nd coordinate vector
%        z - 3rd coordinate vector
% ALTERNATIVE x - matrix of dim n x 3 with coordinates x,y,s as columns
% OUTPUT: inside - boolean variable that indicates whether the points (x, y, z) lie within M
%            val - value of function

if nargin == 1
	z = x(:,3);
	y = x(:,2);
	x = x(:,1);
end

val =  (x.^2 + 9/4*y.^2 + z.^2 - 1).^3 - x.^2 .* z.^3 - 9/80 * y.^2 .* z.^3;
inside = (val < 0);
