r/FastLED • u/sutaburosu [stavros] • Mar 06 '26
Share_something Anti-aliased, sub-pixel positioned 2D graphics primitives using FastLED's new fixed_point types
64
Upvotes
r/FastLED • u/sutaburosu [stavros] • Mar 06 '26
9
u/sutaburosu [stavros] Mar 06 '26 edited Mar 06 '26
The next release of FastLED adds a whole bunch of fixed-point types. I asked Clause Sonnet 4.6 to write some anti-aliased, sub-pixel positioned graphics primitives. Eventually we got something that seems to work.
This video features a number of demonstrations of the four drawing functions that the AI created: lines, thick lines, discs and rings.
It runs on an Arduino Mega (8KiB RAM) with 1,024 LEDs attached to one pin.
If you want to use those drawing functions, the source is available in Wokwi
I feel these kind of drawing functions should be shipped with FastLED. I'm sick of janky LED sketches. With better tools, all of our creations will look better.
2
u/StefanPetrick Mar 08 '26 edited Mar 08 '26
Your work is very inspiring! It makes me play with it immediately.
Video: https://youtu.be/7iRSwWLdzy4
Code: https://pastebin.com/crCL62d9
1
u/Preyy Ground Loops: Part of this balanced breakfast Mar 06 '26
Buttery, even at 13fps :)
Apart from ram, is there a significant increase to execution time with this approach?
1
u/Confident_Name1314 Mar 12 '26
This got me thinking about something. I'm working on LED matrix behaviours that act more like systems than traditional effects (things like flow fields, pressure gradients, structural cracks, etc.). Do you think using the new fixed_point sub-pixel positioning would help make those kinds of behaviours look smoother on matrices? For example fluid motion or tendril-like movement. Or does the benefit mostly show up when drawing shapes/primitives rather than evolving systems?
1
u/not_so_nazi Apr 02 '26
Ai slop
3
u/Marmilicious [Marc Miller] Mar 06 '26
Wooo that's very nice (along with all the other nice updates leveling FastLED up)! Thank you for that video and link.
2
u/big_red__man Mar 06 '26
This is very cool
2
u/chemdoc77 Mar 06 '26
Hi u/sutaburosu - AWESOME! Some really fascinating, Avant Garde animations. Thank you for sharing this video and your code.