A geometric Rust adventure / fuzzy notepad
BRANK

Hi. Yes. Sorry. I’ve been trying to write this post for ages, but I’ve also been working on a huge writing project, and apparently I have a very limited amount of writing mana at my disposal. I think this is supposed to be a Patreon reward from January. My bad. I hope it’s super great to make up for the wait!I recently ported some math code from C++ to Rust in an attempt to do a cool thing with Doom. Here is my story.The problemI presented it recently as a conundrum (spoilers: I solved it!), but most of those details are unimportant.The short version is: I have some shapes. I want to find their intersection.Really, I want more than that: I want to drop them all on a canvas, intersect everything with everything, and pluck out all the resulting polygons. The input is a set of cookie cutters, and I want to press them all down on the same sheet of dough and figure out what all the resulting contiguous pieces are. And I want to know which cookie cutter(s) each piece came from.But inters…

eev.ee
Related Topics: C++ SVG