function [V] = vand(deg,pts,domain)

%%%%%
% Helper function vand 
% to provide a common interface 
% to calculate vandermonde matrix
% for all the domains.
%%%%%


    switch domain

	case 1
		V = chebvand2d(deg,pts);

	case 2
		V = koornwinder_typeII(deg,pts);

	case 3
		V = vandermonde_1D(1,pts,deg,-1,1);

	otherwise
		V = [];
	end

end
