function O=generateSimplexBasis(dim)
O=zeros(dim,dim+1);
for i=1:dim,
    O(i,i)=1;
    O(i,i+1)=-1;
end

O=orth(O');
O=O';