Generators of rings of constants for some diagonal derivations in polynomial rings