Skip to content

borodiychuk/patchwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchwork quilt patterns generator

Build Status Go Report Card

This is a tool that generates patchwork quilt pattern out of given square samples.

Patchwork output example with shuffle composer Patchwork output example with crosses composer

How to run it

Get sure you have Go installed, and then run:

go get github.com/borodiychuk/patchwork

After that you can just call it like that:

patchwork -out patchwork.png -sample-file s1.png -sample-file s2.png -sample-color 255,0,127 -sample-color 127,127,255 # ... and so on

How is it built

The application ties together concepts of:

  1. Sample provider. That is the data source for At this moment the sample can be imported from PNG file.
  2. Pattern composer. It composes a pattern out of available samples. Right now it can combine random samples in a way that no similar samples stay aside horizontally or vertically.
  3. Result renderer. It exports the result in particular format. Right now it can export to PNG.

TODO

  • Sample provider that generates sample of given color.
  • Composer that generates tetris board filled with respective figures.
  • Composer that generates patchwork representation out of provided image.
  • Exporter tht exports the result as ASCII text with symbolic schema and pieces count.

About

Patchwork quilt patterns generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages