Skip to content

ClementTsang/polify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polify

Low-poly image generator library. Written in Rust, with some WebAssembly support. WIP demo here.

The polify_image algorithm is heavily based on this paper by Crystal J. Qian.

Example output

Note results may be subject to change, I'm still trying to improve it, particularily the edges of triangles.

An image of a husky from Erik Mclean:

Husky, by Erik Mclean

Husky after being run through polify

An image of some mountains by Siyuan:

Mountains, by Siyuan

Mountains after run through polify

Another picture of mountains, by Anton Lecock:

More mountains, by Anton Lecock

More mountains after run through polify

Usage

To generate the WASM package for use in something like NPM, use wasm-pack, like so:

wasm-pack build --target bundler

and copy the directory where needed.

Thanks

  • To all the photographers whose art I used for demos.

  • Another mention of the paper by Crystal J. Qian for the algorithm used for image generation.