Variation diminishing transformations and orthogonal polynomials