A$generalized polynomial$is a real-valued function which is obtained from conventional polynomials by the use of the operations of addition, multiplication, and taking the integer part; a$generalized polynomial mapping$is a vector-valued mapping whose coordinates are generalized polynomials. We show that any bounded generalized polynomial mapping$u$:$Z$^{$d$}→$R$^{$l$}has a representation$u$($n$) =$f$($ϕ$($n$)$x$),$n$∈$Z$^{$d$}, where$f$is a piecewise polynomial function on a compact nilmanifold$X$,$x$∈$X$, and$ϕ$is an ergodic$Z$^{$d$}-action by translations on$X$. This fact is used to show that the sequence$u$($n$),$n$∈$Z$^{$d$}, is well distributed on a piecewise polynomial surface $\mathcal{S}\subset\mathbf{R}^{l}$ (with respect to the Borel measure on $\mathcal{S}$ that is the image of the Lebesgue measure under the piecewise polynomial function defining $\mathcal{S}$ ). As corollaries we also obtain a von Neumann-type ergodic theorem along generalized polynomials and a result on Diophantine approximations extending the work of van der Corput and of Furstenberg–Weiss.