Formation and Properties of Anchored Polymers with a Gradual Variation of Grafting Densities on Flat Substrates