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