PPolySim OS
Use case · powered by Diffraction Grating

Diffraction Grating for a rainbow

Simulate a rainbow live in your browser. This runs the real Diffraction Grating solver — adjust the inputs, watch it respond instantly, and export the result. No install, no account.

Diffraction GratingLive

Controls

More slits make the bright maxima sharper and brighter — the principle behind spectrometers that split light into precise spectral lines.

Presets

▶ Run in Python

Data Inspector

Slits5
Resolution∝ N
Maxima atd·sinθ = mλ

Governing equation

Reading this result: The bright maxima stay locked where d·sinθ = mλ — fixed by spacing and wavelength, not slit count — but with 5 slits each principal peak is about 5× narrower and far more intense, which is how a grating resolves fine spectral lines.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →

About this simulation

The full Diffraction Grating tool models a rainbow with the same numerics engineers and scientists use — running entirely client-side. Change any parameter and the result updates in real time, so you can build intuition, check a design, or teach the concept without spreadsheets or installs.

More you can do with Diffraction Grating

Other ways to simulate a rainbow

Frequently asked questions

How do I simulate a rainbow?
Open this page and use the live Diffraction Grating tool below — set your inputs and the simulation runs instantly in your browser using real numerics. No install, no account needed.
Is it free?
Yes. The simulation runs free in your browser. A one-time unlock or a Pro plan adds advanced parameters, saved presets, data import, and clean exports.
Can I use my own numbers?
Absolutely — every input is adjustable, and with data import you can drive a rainbow from your own measurements.