function y=fromsqu_to_tor(x)
%----------------------------------
% Map from the square [0,1] 
% to the torus
%----------------------------------
y=zeros(size(x,1),3);
x=[2.*pi.*x(:,1),2.*pi.*x(:,2)];
y(:,1)=(2+cos(x(:,1))).*cos(x(:,2));
y(:,2)=(2+cos(x(:,1))).*sin(x(:,2));
y(:,3)=sin(x(:,1));
end