Back to browse
GitHub Repository

A web app that reconstructs any image using primitive shapes; port of fogleman/primitive

39 starsTypeScript

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

by taiseiue·Mar 3, 2026·43 points·8 comments

AI Analysis

●●SolidEye CandyCozy

Nostalgic image-to-geometry algorithm with satisfying real-time preview, but it's a demo more than a tool.

Strengths
  • Accessible browser port removes CLI friction from cult-classic Go tool
  • Real-time iterative shape rendering creates engaging visual feedback
  • Configurable shape modes (triangles, beziers, circles) let users experiment with different aesthetics
Weaknesses
  • No practical output use case beyond visual novelty or artistic inspiration
  • Algorithm is unchanged from 2014 original—interesting concept, not novel research
Target Audience

Designers, developers, artists wanting to experiment with image reconstruction

Similar To

Deep Dream Generator · Neural Style Transfer tools

Post Description

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.

Similar Projects

OxiMedia – Pure Rust Reconstruction of FFmpeg and OpenCV

1.36M LOC pure Rust reimplementation—v0.1.0, APIs stabilized, perf unproven.

Bold BetWizardry
kitasan
11112mo ago