  The motivation of this work stems from the numerical approximation of bounded
functions by polynomials satisfying the same bounds. The present contribution
makes use of the recent algebraic characterization found in [B. Despr\'es,
Numer. Algorithms, 76(3), (2017)] and [B. Despr\'es and M. Herda, Numer.
Algorithms, 77(1), (2018)] where an interpretation of monovariate polynomials
with two bounds is provided in terms of a quaternion algebra and the Euler
four-squares formulas. Thanks to this structure, we generate a new nonlinear
projection algorithm onto the set of polynomials with two bounds. The numerical
analysis of the method provides theoretical error estimates showing stability
and continuity of the projection. Some numerical tests illustrate this novel
algorithm for constrained polynomial approximation.
