I need a mathematician, Iridescence effect canvas?

github logo ・1 min read

This is the effect I most want to produce on canvas in 2D or glsl contexts. Does anyone know the algorithm to do this? Its like oil on water and so on, note that it's vibrant and rough which is kind of what I'm after, is it perlin noise that I should investigate? I'd also like it to animate really slowly at the speed of crude oil.

twitter logo DISCUSS (8)
markdown guide
 
 

Jackpot! For interested parties here is a link to the ever reliable Wikipedia. Link to wiki

 

A side note, thank you Andras this was a very clever and kind suggestion.

 

Here, I found this fantastic tutorial of the concept, seems to be a variation on the game of life.

karlsims.com/rd.html

 
 

Yeah I found that and the paper he references is in the comments, thank you so much.

 

Specifically on the optics (and how to simulate it in a computer) of iridescence, Alan Zucconi has an excellent blog series:

alanzucconi.com/2017/07/15/cd-rom-...

 

So that covers the colour. As well, thanks Curtis!

Classic DEV Post from Jan 25

Language Features: Best and Worst

I'm interested in building my own programming language and I want to know: what...

Adam Crockett profile image
I work at Dyson as a Front end focused Full stack developer, I play with all sorts really. Lately WASM is my toy of interest.

dev.to now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

P.S. You can also change font to sans serif, which a lot of folks prefer. 💖