Skip to content

Given an input image, and the number of voronoi partitions to create, this program imitates a flood fill algorithm starting from a randomly generated set of center coordinates in the image to create the specified number of partitions in the image.

License

shlyyzy/voronoiArt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voronoi Art

Given an input image, and the number of voronoi partitions to create, this program imitates a flood fill algorithm starting from a randomly generated set of center coordinates in the image to create the specified number of partitions in the image. The results are interesting artistic images where every pixel in a given voronoi partition have the same color.

How to run

  • git clone https://github.com/shlyyzy/voronoiArt.git
  • stack setup
  • stack build
  • stack ghci
    • :set args <input image path> <output image path> <number of voronoi partitions>
    • main

Examples!

Original

10 Centers

100 Centers

10 000 Centers

10 000 000 Centers

About

Given an input image, and the number of voronoi partitions to create, this program imitates a flood fill algorithm starting from a randomly generated set of center coordinates in the image to create the specified number of partitions in the image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published