wallpaper: A library and executable for creating wallpaper, frieze, and rosette patterns.

[ bsd3, graphics, library, program ] [ Propose Tags ]

wallpaper provides the tools needed to make your own wallpapers, friezes and rosettes as described in Frank A. Farris's beuatiful book Creating Symmetry. Following Farris we use the domain coloring algorithm to create recipes that convert an arbitrary image to a pattern. For example, using the this image

We can make

For maximum flexibily the wallpaper library provides an EDSL for their creation, alternatively the wallpaper and rosette executables can be used with a yaml file to create a large variety of patterns.


[Skip to Readme]
Versions 0.1.0.0, 0.1.0.1
Dependencies base (>=4.7 && <5), bytestring (==0.10.*), filepath (==1.4.*), JuicyPixels (==3.2.*), text (==1.2.*), wallpaper, yaml (==0.8.*) [details]
License BSD-3-Clause
Copyright Copyright (c) 2017 Jeffrey Rosenbluth
Author Jeffrey Rosenbluth
Maintainer jeffrey.rosenbluth@gmail.com
Revised Revision 1 made by HerbertValerioRiedel at Fri May 26 21:29:52 UTC 2017
Category Graphics
Home page https://github.com/jeffreyrosenbluth/wallpaper#readme
Source repo head: git clone https://github.com/jeffreyrosenbluth/wallpaper
head: git clone https://github.com/jeffreyrosenbluth/wallpaper
Uploaded by jeffreyrosenbluth at Fri May 26 20:57:38 UTC 2017
Distributions NixOS:0.1.0.1
Executables rosette, wallpaper
Downloads 613 total (11 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-05-26 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for wallpaper-0.1.0.1

[back to package description]

wallpaper

Symmetry Patterns

Create wallpaper patterns using the domain coloring algorithm as described in Creating Symmetry, by Frank A. Farris, (c) 2015 Princeton University Press.

The api is likely to change as this is still an alpha release.

Installation

Install stack

git clone https://github.com/jeffreyrosenbluth/wallpaper.git
cd wallpaper
stack build
stack exec wallpaper myWallpaper.yaml
-- or
stack exec rosette myRosette.yaml

Wallpaper and Frieze

Example

To make a wallpaper or frieze image, run the wallpaper function with a yaml file like the following. There are many examples.

# The wallpaper or frieze symmetry group in short IUC notation.
# If the group lattice takes parameters then they follow tagged
# by there names, for example:
#   Group:
#     Name: p1
#     xi: 1.5
#     eta: 2.1
# If the group lattice takes no parameters you can use either
#   Group:
#     Name: p4
# or, just directly:
#   Group: p4
Group: p3m1

# A list of doubly indexed complex coefficients for the wave function.
# Additional wave packets will be added in order to create the symmetries in
# the specified symmetry group.
Coefficients:
- A(n,m): [0.75, 0.25] # 0.75 + 0.25i
  n: 1                 # first index of coefficient
  m: 0                 # second index of coefficient
- A(n,m): [0.2, -0.2]
  n: -2
  m: 2
- A(n,m): [0.6, 0.1]
  n: 1
  m: -1

# Optional field for setting the style, choices are: plain, morph (which takes
# one parameter: cutoff), and blend (which takes as an argument a group object).
# morph will interpolate between the color wheel and its 180 degree rotation,
# leaving the proportion specified by cutoff at the beginning and end.
# Blend interpolates horizontally between two different wallpaper groups.
# If left unspecified type will default to style: plain.
Type:
  style: blend
  group:
    name: p31m

Options:
  width: 945        # width in pixels of the output image
  height: 405       # height in pixels of the output image
  repeat-length: 90 # used to convert pixel coordinates to real numbers
  scale-factor: 0.5 # to scale the color wheel so that it contains the domain values

# Optional, defaults to the standard artists color wheel of infinite size.
Colorwheel-path: examples/rose_small.png

# Optional, Preprocess the image, choices are: none, fliphorizontal,
# flipvertical, flipboth, invert, antisymmvertical, and antisymmhorizontal.
# The default is none.
Pre-process: AntiSymmHorizontal

# File to write the result. The file type will match the extension.
# Choices for extenstion are: png, jpg, tif, and bmp.
Output-path: myWallpaper.jpg

Rosette

example

To make a rosette, use a yaml file like the following. There are also some examples, look at rosetteP.yaml and rosettePM.yaml.

P-fold: 5    # the number of rotational symmetries
Mirror: true # symmetric about the horizontal axis

# (n - m) mod P-fold must be 0, otherwise the wave packet will not be included.
Coefficients:
- A(n,m): [0.5, 0]
  n: 5  # (5 - 0) mod 5 = 0
  m: 0
- A(n,m): [0.3, 0]
  n: 4  # (4 - (-6)) mod 5 = 0
  m: -6
Options:
  width: 540
  height: 540
  repeat-length: 135
  scale-factor: 0.5
Colorwheel-path: examples/rose_small.png
Pre-process: invert
Output-path: myRosette.jpg