function pout=applyTransform(pin,t)

if size(pin,1)~=2
    error('Input points must be two dimensional: 2xM')
end

if length(t)~=3
    error('Malformed input transformation')
end

M=makeTransformMatrix(t);

pin(3,:)=zeros(1,size(pin,2));
pin(4,:)=ones(1,size(pin,2));

pout=M*pin;

pout=pout(1:2,:);
