Story

Show HN: Reconstruct any image using primitive shapes, runs in-browser via WASM

taiseiue Tuesday, March 03, 2026

I built a browser-based port of fogleman/primitive — a Go CLI tool that approximates images using primitive shapes (triangles, ellipses, beziers, etc.) via a hill-climbing algorithm. The original tool requires building from source and running from the terminal, which isn't exactly accessible. I compiled the core logic to WebAssembly so anyone can drop an image and watch it get reconstructed shape by shape, entirely client-side with no server involved.

Demo: https://primitive-playground.taiseiue.jp/ Source: https://github.com/taiseiue/primitive-playground

Curious if anyone has ideas for shapes or features worth adding.

Summary
The article introduces 'primitive-playground', a project that provides a web-based playground for experimenting with various primitive drawing algorithms. It focuses on simplifying the process of exploring and understanding these algorithms, allowing users to easily adjust parameters and see the visual results.
22 6
Summary
github.com
Visit article Read on Hacker News Comments 6