MyNixOS website logo
Description

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

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.

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
Metadata

Version

0.1.0.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows