function P = buildP(f2D, f3D) 
% constructs projection matrix out of f2D and f3D

f3D = f3D';
f2D = f2D';
zerov = zeros(1,size(f3D,2));

c = [];
for i=1:size(f3D,1),
    c = [c; f3D(i,:) zerov -f2D(i,1)*f3D(i,:)];
    c = [c; zerov f3D(i,:) -f2D(i,2)*f3D(i,:)];
end

P = c;