r/FastLED • u/wokwi • Dec 16 '20
Share_something FastLED 3D Spirals Simulation (link in comment)
4
u/ldirko Dec 17 '20
with this layout can possible to make infinite two loop, like mebius.
just quick non optimize sample: https://wokwi.com/arduino/projects/285144771344728584
3
4
u/ldirko Dec 17 '20 edited Dec 17 '20
u/wokwi you really think there would be without fire? )))
2
u/wokwi Dec 17 '20
of course! 🔥
I tried to make it into a fireball with 15 strips, but not all of them light up. Maybe you can figure out what I missed?
2
u/ldirko Dec 17 '20
in diagram json change 512: "attrs": {"pixels": "512}
need 960 pixel to your setup 15х64, work like charm )))
2
2
u/Marmilicious [Marc Miller] Dec 17 '20 edited Dec 17 '20
I messed with this a bit. Pretty neat. This runs about about 105% on my computer so not super smooth.
(updated link)
2
u/wokwi Dec 17 '20
Thanks! 105% but not smooth?
3
u/Marmilicious [Marc Miller] Dec 17 '20
Well it didn't seem smooth to me. Maybe I don't correctly understand what that % means. Can you explain it again?
2
u/wokwi Dec 17 '20
Sure, 100% means that simulation runs in real time (so 1 virtual second = 1 real second). As the percentage goes higher, simulation runs faster than real time (so 105% means every 1.05 seconds in simulation takes just 1 second in real time).
Does that make sense?
1
u/Marmilicious [Marc Miller] Dec 17 '20
Yes that makes sense. I don't know what was going on yesterday. I think maybe my browser needed to be closed/restarted because things are running/displaying smoothly today. I just updated my link above with slightly different code to give more of a look I was envisioning in my head.
I think I've run into this a few other times but didn't realize something was going strange in the cache. I think I've also saved a project and opened the link in a new tab but it still showed old code data until something was refreshed and then it was correct. I have no idea how that stuff works under the hood, and what does or doesn't cause whatever is cached to be updated. (I'm using Chrome btw.)
1
u/wokwi Dec 18 '20
Yes, there's definitely some issue with the cache - I've seen this too!
While I'm looking into this, I found that refreshing the page a few times usually helps
1
u/wokwi Dec 18 '20
Oh, and the globe is very cool! 😍
Makes me want to build one in real life.
BTW, yesterday someone wrote to me that he plugged the simulation into his Oculus Quest, and the spirals were in the size of a 4-story building 😲
2
4
u/ldirko Dec 17 '20
just add lookup table. now its infinite circle with 0 to 639 index. need to find formula to delete lookup table
3
3
u/Marmilicious [Marc Miller] Dec 17 '20
That's great, nice addition!
Yes, definitely a bit more taxing on the system. Like the 2D version too.
3
8
u/wokwi Dec 16 '20
This one may be a bit taxing on your CPU/GPU:
https://wokwi.com/arduino/projects/284895354051101197
I took the 3D-cube demo I made a few months ago, and projected the same program into 5 LED strips arranged into 3D spirals. This is the result.
So same animation, but different LED arrangement.
I'm very curious to see what patterns you can create for this setup. You can change the number of strips, the amount of LEDs per strip, how much they curl, etc. by editing the query parameters in
"customView"inside diagram.json. The documentation for the parameters + 3D scene source code are open on GitHub.If your computer isn't powerful enough, I also made a lightweight 2D version:
https://wokwi.com/arduino/projects/284908394020602380
Please surprise me! 😲