function [x,y,z,u4] = ShowLevel(c,ell,level,VIEW)
% given the Fourier coefficients c and domain size ell transform
% to the solution u in real space and plot an isosurface at u = level.
% optionally, set the viewing direction for the plot.


if exist('intval','file')
  setround(0);
end
cs=size(c);
K=(cs(1)-1)/2;

M = max(K+1,16);
u3=zeros(2*M,2*M,2*M);
pos=M+1+(-K:K);
u3(pos,pos,pos)=c;
u4=(2*M)^3*ifftn(ifftshift(u3));
u4=real(u4);
u4(end+1,:,:)=u4(1,:,:);
u4(:,end+1,:)=u4(:,1,:);
u4(:,:,end+1)=u4(:,:,1);
xpi=linspace(0,2*pi*ell,(2*M+1));
[x,y,z]=meshgrid(xpi,xpi,xpi);
if nargin == 4
    PlotIsosurf(x,y,z,u4,level,VIEW);
else
    PlotIsosurf(x,y,z,u4,level);
end;