% Given a set,c ompute the orthogonal projection onto a given plane

% Define a set in R^3
X = WireFrame3;

M = [4 -2; 1 0; 0 1];

P = M * inv(M' * M) * M';

P*X;

WireFrame3(P*X,'.k')
