Abstract??H-bases are bases for polynomial ideals, characterized by the fact that their homogeneous leading terms are a basis for the associatedhomogeneous ideal. In the computation ofH-bases without term orders, an important task is to determine the orthogonal projection of a homogeneous polynomial to certain subspaces of homogeneous polynomials with respect to a given inner product. One way of doing so is to use an orthogonal basis of the subspace. In this paper, we present and study a method to efficiently compute such a basis for a particular but important inner product.