Symmetry groups of regular polytopes in three and four dimensions