Create prisms

Tap to create your own shapes, or use ours.
Drag anywhere to move a completed shape.
Drag corners of a completed shape to resize and rotate.
Tap on when you're done.

Delete prisms

Tap on a prism to delete it.
Tap on when you're done.
Tap on to delete all prisms

Change boundary Boundary reflectivity                              
0% 100%
Reset simulation

Light rays go back to where they started.
Tap screen to start again.

Delete all light rays

Start again with just the prisms

Help Message me on Twitter @mklilley

Let's make rainbows

Why?

I saw the most spectacular rainbow 🌈 not long ago and wondered whether I could simulate it 🤔. Emboldened by my recent project to build a particle simulation with the help of ChatGPT, I decided this rainbow idea would be totally doable and super fun.

What?

Turns out, simulating a rainbow is kind of complicated. So, as a first step, I decided to create something "simple".

"Let's make rainbows" allows you to explore the underlying physics of rainbow formation (refraction, dispersion and total internal refection) by shooting light rays at various shaped prisms and watching how the different colours bend and reflect. You can even make your own shapes and challenge yourself to traverse a prism maze 🤯.

My hope is that, through experimentation, you will develop a intuition for how light behaves and gain a deeper appreciation for the beauty of rainbows 🌈.

Plenty of approximations have been made to bring you "Let's make rainbows" in its current form. To learn more, check out my blog once you've finished playing.

How? - IMPORTANT

  • Tap to start/stop the simulation
  • Drag to make new light rays
  • Hold to create new prisms and more

🌈 Templates

  • Blank canvas - you make the rules
  • Classic prism - the one you saw at school
  • Star trek prism - because I love Star Trek 🤓
  • Star wars prism - because it's only fair 😉
  • Prism maze game - make a light ray at the top and try to get all the colours to reach the bottom.

You can share what you make - just copy the URL. I can't wait to see what you come up with.

P.S. You mobile will work fine with these templates, but there are more prisms to see on a lager screen.

P.S. Show this welcome screen again from the help menu.