Primitive favicon

Primitive

Primitive is a Go (Programming Language) command-line app based on Roger Alsing's great work, that reproduces images using geometric primitives such as ovals, triangles and rectangles.

Features

  • Hill Climbing or Simulated Annealing for optimization (hill climbing multiple random shapes is nearly as good as annealing and faster)
  • Scanline rasterization of shapes in pure Go (preferable for implementing the features below)
  • Optimal color computation based on affected pixels for each shape (color is directly computed, not optimized for)
  • Partial image difference for faster scoring (only pixels that change need be considered)
  • Anti-aliased output rendering