Visual tool for electromagnetic simulation and design of multilayer grating structures