function X=pointset(N,j,t)
%--------------------------------------------------
% This function generates a point set between Halton, Fibonacci and Greedy
% minimal k_s-energy points on the cone/cylinder/torus
% INPUT:
% N - How many point you generate (or the N-th fibonacci number for the
%     Fibonacci lattice
% j - Points set: 1=Halton, 2=Fibonacci, 3=GM k_s-energy
% t - Manifold: 1=Cone, 2=Cylinder, 3=Torus, 4=Sphere
%---------------------------------------------------
switch t
    case 1
        switch j
            case 1
                X=conhaltonMATLAB(N);
            case 2
                X=confib(N);
            case 3
                x=linspace(0,1,ceil(N/sqrt(2)));
                [Z1,Z2]=meshgrid(x);
                Y=fromsqu_to_con([Z1(:),Z2(:)]);
                tic;
                X=pts_MinEnRiesz(Y,N,2);
                toc;
        end
    case 2
        switch j
            case 1
                X=cylhaltonMATLAB(N);
            case 2
                X=cylfib(N);
            case 3
                x=linspace(0,1,ceil(N/sqrt(2)));
                [Z1,Z2]=meshgrid(x);
                Y=fromsqu_to_cyl([Z1(:),Z2(:)]);
                tic;
                X=pts_MinEnRiesz(Y,N,2);
                toc;
        end
    case 3
        switch j
            case 1
                X=torhaltonMATLAB(N);
            case 2
                X=torfib(N);
            case 3
                x=linspace(0,1,ceil(N/sqrt(2)));
                [Z1,Z2]=meshgrid(x);
                Y=fromsqu_to_tor([Z1(:),Z2(:)]);
                tic;
                X=pts_MinEnRiesz(Y,N,2);
                toc;
        end
        case 4
        switch j
            case 1
                X=sphhaltonMATLAB(N);
            case 2
                X=sphfib(N);
            case 3
                x=linspace(0,1,ceil(N/sqrt(2)));
                [Z1,Z2]=meshgrid(x);
                Y=fromsqu_to_sph([Z1(:),Z2(:)]);
                tic;
                X=pts_MinEnRiesz(Y,N,2);
                toc;
        end
end

end