In a few other threads, people have asked about a plasma effect or Perlin noise generation. I dug in to learn about procedural gradient noise.
I think this really shows the power of the (relatively) new UI controls we can put in our patterns. They were really useful for debugging. I also added a sound-reactive pulser.
FYI @dllnoah since you asked about this 6 months ago; I think you can achieve your screenshot with a few modifications of this code. If you have a big matrix, I can volunteer a few hours to help adapt it.
@jeff excellent work! The 1D version looks great on my 60 LED/m strip, very plasma-like. Thanks for digging into this topic and producing such a good pattern.
var F2 = 0.5 * (Math.sqrt(3.0) - 1.0);
var G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
var F3 = 1.0 / 3.0;
var G3 = 1.0 / 6.0;
var F4 = (Math.sqrt(5.0) - 1.0) / 4.0;
var G4 = (5.0 - Math.sqrt(5.0)) / 20.0;
which might make sense for readability of what he is doing… but those can all be simplified and should offer a little speedup… though they only seem to be executed once.
You know, if memory serves, I saw this one but didn’t use it because I read that simplex noise has IP legal issues for use in 3 dimensions and higher. I’m wondering if I’ve got that wrong or these folks are just playing fast and loose? The Wiki for it seems to say it’s a patented algo for 3+D, which means copyright aside you can’t implement it (I think…)
Yay, software IP! A world of fun! Chances are nobody will mess with you for just writing the program, but associating it with a for-profit commercial product is asking for a cease-and-desist at least. It looks like the patent expires in January 2022, but for the moment, it’s owned by a patent troll firm. That’s um, not good. (google “wsou investments troll”)
---- STOP HERE TO DODGE SOFTWARE IP LAW TL;DR –
(Speaking as someone who patented a pile of things for a major corporation: (1) software patent law is deeply annoying and silly, and desperately needs reform, (2) the big guys take protecting their IP really, really seriously, and (3) patent trolling is a huge problem for everybody.
The big companies may seem like malevolent jerks, but what they’re actually doing is protecting themselves from each other – if Apple lets a little infringement slide by just once, Samsung can and will nuke them with that fact in court, and then Apple may lose incredibly profitable rights to something they invented. Shareholders pretty much insist that companies protect those rights.
It’s a very, very expensive game to play – terrible for smaller players. And patent troll companies, who buy up patents and use them to sue everybody in sight, big or small, make it even worse. Best to avoid poking lawyers when possible.)
FastLED uses simplex noise, so… Patents be damned, let the LEDs shine freely.
That said, I suspect a non-commercial implementation is unlikely to have any issues. But I’m not saying Ben should add a noise function to the firmware/PB functions. Ok, actually he should, but something he doesn’t worry about the patent on.
It’s 32x16. The cells are tubes of rolled mirror film and the led array is set in a slight V shape with the top of the V close to the edges and the bottom set back about 5cm. This helps to diffuse and mix the colors as well as give a slight sense of depth.