Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Ruby code and tools for animating Voronoi diagrams (github.com/mike-bourgeous)
70 points by nitrogen on April 20, 2021 | hide | past | favorite | 7 comments



I wrote a little more about this project here: https://blog.mikebourgeous.com/2021/04/18/animated-graphics-...

I've spent some of my extra time during the last year making visualization-heavy videos about Ruby, graphics, and sound. This is some of the code I wrote for that series, and will feature Voronoi diagrams in my next video. More about that infrequently but diligently released series here: https://blog.mikebourgeous.com/2021/03/10/why-cant-we-use-ru...


FYI: I help out with the Ruby Pixel Art Week 2021, April 19th to April 25th - 7 Days of Ruby (Graphics) Gems. The Ruby Pixel Art Week 2021 presents a new Ruby graphics library every day from April 19th to April 25th, see https://planetruby.github.io/gems

Day 1 features the chunky_png Gem - Turn Pixelated Billie Eilish and Lady Gaga Portraits into True 24x24 Pixel Art, see https://planetruby.github.io/gems/pixel/01-chunky-png


Thanks for taking the time for (all) of this. Re Ruby + sound, assume you know of it, but if not I stumbled on this late in my Ruby using timeline, might be of interest, certainly is to my kiddos: https://sonic-pi.net/.


I did run into Sonic Pi about a year after I started down this road. It looks like it's largely backed by C++ to do the heavy lifting, and I'm trying to go pure Ruby (and using Ruby idioms) as much as possible. Different niches, I think -- Sonic Pi looks really good for music production, while music is only incidental to my current project.

The DSL I created was kind of an accident, and people should use Sonic Pi if they want something "serious" and supported. I'm more focused on writing code that illuminates some algorithms I think are interesting (some not polished/released yet), and that the average Rubyist can read. I think there's room for both, and I think most people looking to use a Ruby DSL for music will want to use Sonic Pi.

Hopefully what I'm doing provides a somewhat unique extra angle to help people learn about sound and Ruby, or at least makes some cool graphics that are fun to look at. There's a lot of great code and content out there, but I'm hoping I can bridge some of these concepts together in a way that hasn't quite been done before.


Very much looking forward to your experiments and completely agree with the sentiment. https://github.com/speciesFileGroup/waxy is my experiment in that foray.

Increasingly it's only a short hop from experiment/play to use in production in many ways, especially when it comes to viz.


Nice. The first sample looks kind of like a spider chart, but easier to read. The grid layout also kind of reminds me of a flamegraph. Items (servers, site pages, assets, PCR machines, factory equipment) could be rendered with the 6 corners of hexagons representing machine status, making it easy to read the health of a whole system at a glance.

Are there any public examples of those hexagons being used in practice? I spent a minute or two clicking around the SpeciesFileGroup/taxonworks site but didn't run into any hexagons.


Not public, our production and sandbox instances are behind passwords. Exactly flame-graph like use. We use a somewhat updated version of the first pic as a hub for tracking images that are being processed, i.e. fully colored is done. We use single hexes as quick indicators of digitization/record completeness. Our collaborators want more, they want to use versions to filter results etc.

I should update the images on the repo with some more demos. There are some nice ways to order the hexes by simple Ruby sorts, different layouts, etc. You can get spiral layouts with complete records to the center, etc. I have used it as a toy library to play with quilt (fabric) prototyping for my sig other too, less flashy, but fun.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: