function P = ConstructProjection1(axis)
  % -----------------------------------------------------------------------
  % ConstructProjection1 - Construct the projection matrix that projects
  %                        onto the given axis.
  %
  % Args: axis - 'x', 'y' or 'z': the axis of rotation
  %
  % Rtns: P - the 4 x 4 matrix of the projection
  % -----------------------------------------------------------------------

  switch axis
  case 'x' % project onto the x axis
    P = [
      1  0  0  0
      0  0  0  0
      0  0  0  0
      0  0  0  1
    ];
  case 'y' % project onto the y axis
    P = [
      0  0  0  0
      0  1  0  0
      0  0  0  0
      0  0  0  1
    ];
  case 'z' % project onto the z axis
    P = [
      0  0  0  0
      0  0  0  0
      0  0  1  0
      0  0  0  1
    ];
  otherwise
    error('"%s" is not a valid axis', axis);
  end
end
