Skip to content

samchristywork/jigsaw-puzzle-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

Overview

This is a program that generates puzzle pieces, and renders them to SVG images that can be viewed in a web browser or processed by other applications. The puzzle pieces are created by connecting Bézier curves. The shape of these curves are determined by the position of control points. Altering the X and Y offsets of sets of control points is the primary way that variation in the shape of the pieces is generated.

Example

Board made from puzzle pieces.
Puzzle piece with control points.

Features

  • Can create whole boards of puzzle pieces
  • Every piece fits together with the pieces surrounding it
  • Configurable zoom levels and board size
  • Deformation is constrained so that pieces don't have intersecting curves
  • The board has flat borders
  • Amount of space between the pieces is configurable
  • Render differentiated puzzle pieces as SVG
  • Rich composable transformation infrastructure
  • Pieces composed of Bézier curves
  • Control points can be shown for debugging
  • SVG module gives access to useful drawing primitives like curves and text
  • Piece differentiation generated from deterministic hashes
  • Shapes are enclosed vector paths. This is an important property for some algorithms
  • Vector struct with functions for composability
  • SVG is built as a string that can be written to a file

License

This work is licensed under the GNU General Public License version 3 (GPLv3).

About

Generates pieces for a jigsaw puzzle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages