fogleman/primitive ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go tool that takes an image and recreates it using simple geometric shapes like triangles, rectangles, circles, ellipses, and rotated rectangles.

I want to give it a source image, let it work through a bunch of iterations, and have it keep adding shapes that make the result look closer and closer to the original. The output should be a stylized, abstract version of the picture, but still recognizable. Please support saving the result as PNG, JPG, SVG, and an animated GIF that shows the shapes being added over time.

It would be great if I could choose how many shapes to use, pick the shape style, set the background and transparency, resize big images for speed, and optionally save intermediate frames too. If it makes sense, include a simple command line interface and make it fast enough to run on normal sized photos.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab