simetri.wallpaper package¶
Submodules¶
simetri.wallpaper.wallpaper module¶
Simetri graphics library’s wallpaper patterns.
- simetri.wallpaper.wallpaper.cover_hex(item: Batch | Shape | Tag, size: float, gap: float = 0, reps1: int = 2, reps2: int = 2, flat: bool = True) Batch [source]¶
Covers an area with a hexagonal pattern.
- Parameters:
size (float) – The size of the hexagons.
gap (float, optional) – The gap between hexagons. Defaults to 0.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 2.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 2.
flat (bool, optional) – If True, hexagons are flat-topped. Defaults to True.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.cover_hex_flat(item: Batch | Shape | Tag, size: float, gap: float = 0, reps1: int = 2, reps2: int = 2) Batch [source]¶
Covers an area with a hexagonal pattern with flat tops.
- Parameters:
size (float) – The size of the hexagons.
gap (float, optional) – The gap between hexagons. Defaults to 0.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 2.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 2.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.cover_hex_pointy(item: Shape | Batch | Tag, size: float, gap: float = 0, reps1: int = 2, reps2: int = 2) Batch [source]¶
Covers an area with a hexagonal pattern with pointy tops.
- Parameters:
size (float) – The size of the hexagons.
gap (float, optional) – The gap between hexagons. Defaults to 0.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 2.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 2.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.cover_rhombic(item: Batch | Shape | Tag, size: float, reps1: int = 2, reps2: int = 2) Batch [source]¶
Covers an area with a rhombic pattern.
- Parameters:
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.hex_grid_pointy(x: float, y: float, size: float, n_rows: int, n_cols: int) Batch [source]¶
Creates a hexagonal grid with pointy tops.
- Parameters:
x (float) – The x-coordinate of the starting point.
y (float) – The y-coordinate of the starting point.
size (float) – The size of the hexagons.
n_rows (int) – Number of rows in the grid.
n_cols (int) – Number of columns in the grid.
- Returns:
The resulting grid as a Batch of Shapes.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_cm(generator: Batch | Shape | Tag, mirror_point: Sequence[float], rhomb_size: float, reps1: int = 4, reps2: int = 4, horizontal: bool = True) Batch [source]¶
Spinning-sidle symmetry. IUC: cm(c1m1) Conway : *x Rhombic lattice Point group: D1
- Parameters:
mirror_point (Point) – The point of symmetry.
rhomb_size (float) – The size of the rhombuses.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
horizontal (bool, optional) – If True, the mirror line is horizontal. Defaults to True.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_cmm(generator: Batch | Shape | Tag, mirror_cross: Sequence[float], rhomb_size: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Staggered double mirror symmetry. IUC: cmm(c2mm) Conway : 2*22 Rhombic lattice Point group: D2
- Parameters:
mirror_cross (Point) – The point where the mirror lines cross.
rhomb_size (float) – The size of the rhombuses.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p1(generator: Batch | Shape | Tag, vector1: Sequence[float], vector2: Sequence[float], reps1: int = 4, reps2: int = 4) Batch [source]¶
Translation symmetry. IUC: p1 Conway: o Oblique lattice Point group: C1
- Parameters:
vector1 (VecType) – The translation vector in the x direction.
vector2 (VecType) – The translation vector in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting wallpaper pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p2(generator: Shape | Batch | Tag, vector1: Sequence[float], vector2: Sequence[float], reps1: int = 4, reps2: int = 4) Batch [source]¶
Half-turn rotation symmetry. IUC: p2 (p211) Conway: 2222 Oblique lattice Point group: C2
- Parameters:
vector1 (VecType) – The translation vector in the x direction.
vector2 (VecType) – The translation vector in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting wallpaper pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p2_rect_lattice(generator: Shape | Batch | Tag, rotocenter: Sequence[float], vector1: Sequence[float], vector2: Sequence[float], reps1: int = 4, reps2: int = 4) Batch [source]¶
- simetri.wallpaper.wallpaper.wallpaper_p3(generator: Shape | Batch | Tag, rotocenter: Sequence[float], distance: float, reps1: int = 4, reps2: int = 4, flat_hex: bool = False) Batch [source]¶
Three rotations. IUC: p3 Conway: 333 Hexagonal lattice. Point group: C3
- Parameters:
rotocenter (Point) – The center of rotation.
distance (float) – The distance between the centers of the hexagons.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
flat_hex (bool, optional) – If True, hexagons are flat-topped. Defaults to False.
- Returns:
The resulting wallpaper pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p31m(generator: Batch | Shape | Tag, center_point: Sequence[float], hex_size: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Three rotations and a mirror. IUC: p31m Conway : 3*3 Hexagonal lattice Point group: D3
- Parameters:
center_point (Point) – The center point for the symmetry.
hex_size (float) – The size of the hexagons.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p3m1(generator: Batch | Shape | Tag, center_point: Sequence[float], hex_size: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Mirror and three rotations. IUC: p3m1 Conway : *333 Hexagonal lattice Point group: D3
- Parameters:
center_point (Point) – The center point for the symmetry.
hex_size (float) – The size of the hexagons.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p4(generator: Batch | Shape | Tag, rotocenter: Sequence[float], distance: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Pinwheel symmetry. IUC: p4 Conway: 442 Square lattice Point group: C4
- Parameters:
rotocenter (Point) – The center of rotation.
distance (float) – The distance between the centers of the squares.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting wallpaper pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p4g(generator: Batch | Shape | Tag, dist: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Mirrored pinwheel symmetry. IUC: p4g(p4gm) Conway : 4*2 Square lattice Point group: D4
- Parameters:
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p4m(generator: Batch | Shape | Tag, mirror_cross: Sequence[float], side_length: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Block symmetry. IUC: p4m(p4mm) Conway : *442 Square lattice Point group: D4
- Parameters:
mirror_cross (Point) – The point where the mirror lines cross.
side_length (float) – The side length of the squares.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p6(generator: Batch | Shape | Tag, rotocenter: Sequence[float], hex_size: float, reps1: int = 4, reps2: int = 4, flat_hex=False) Batch [source]¶
Six rotations. IUC: p6 Conway : 632 Hexagonal lattice Point group: C6
- Parameters:
rotocenter (Point) – The center of rotation.
hex_size (float) – The size of the hexagons.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
flat_hex (bool, optional) – If True, hexagons are flat-topped. Defaults to False.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_p6m(generator: Batch | Shape | Tag, rotocenter: Sequence[float], mirror_cross: Sequence[float], hex_size: float, reps1: int = 4, reps2: int = 4, flat_hex: bool = False) Batch [source]¶
Kaleidoscope. IUC: p6m(p6mm) Conway : *632 Hexagonal lattice Point group: D6
- Parameters:
rotocenter (Point) – The center of rotation.
mirror_cross (Point) – The point where the mirror lines cross.
hex_size (float) – The size of the hexagons.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
flat_hex (bool, optional) – If True, hexagons are flat-topped. Defaults to False.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_pg(generator: Batch | Shape | Tag, mirror_line: Sequence[Sequence], distance: float, dx: float, dy: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Glide symmetry. IUC: pg(p1g1) Conway : xx Rectangular lattice Point group: D1
- Parameters:
mirror_line (Line) – The line of symmetry.
distance (float) – The distance for the glide reflection.
dx (float) – Translation distance in the x direction.
dy (float) – Translation distance in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_pgg(generator: Batch | Shape | Tag, rotocenter: Sequence[float], dx: float, dy: float, reps1: int = 4, reps2: int = 4, horizontal=True) Batch [source]¶
Double glide symmetry. IUC: pgg(p2gg) Conway : 22x Rectangular lattice Point group: D2
- Parameters:
rotocenter (Point) – The center of rotation.
dx (float) – Translation distance in the x direction.
dy (float) – Translation distance in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
horizontal (bool, optional) – If True, the glide reflection is horizontal. Defaults to True.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_pm(generator: Batch | Shape | Tag, mirror_line: Sequence[Sequence], dx: float, dy: float, reps1: int = 4, reps2: int = 4) Batch [source]¶
Mirror symmetry. Mirror could be horizontal or vertical. IUC: pm(p1m1) Conway : ** Rectangular lattice Point group: D1
- Parameters:
mirror_line (Line) – The line of symmetry.
dx (float) – Translation distance in the x direction.
dy (float) – Translation distance in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_pmg(generator: Batch | Shape | Tag, center_point: Sequence[float], dx: float, dy: float, reps1=4, reps2=4, horizontal=True) Batch [source]¶
Glided staggered symmetry. IUC: pmg(p2mg) Conway : 22* Rectangular lattice Point group: D2
- Parameters:
center_point (Point) – The center point for the symmetry.
dx (float) – Translation distance in the x direction.
dy (float) – Translation distance in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
horizontal (bool, optional) – If True, the mirror line is horizontal. Defaults to True.
- Returns:
The resulting pattern as a Batch object.
- Return type:
- simetri.wallpaper.wallpaper.wallpaper_pmm(generator: Batch | Shape | Tag, mirror_cross: Sequence[float], dx: float, dy: float, reps1=4, reps2=4) Batch [source]¶
Double mirror symmetry. IUC: pmm(p2mm) Conway : *2222 Rectangular lattice Point group: D2
- Parameters:
mirror_cross (Point) – The point where the mirror lines cross.
dx (float) – Translation distance in the x direction.
dy (float) – Translation distance in the y direction.
reps1 (int, optional) – Number of repetitions in the x direction. Defaults to 4.
reps2 (int, optional) – Number of repetitions in the y direction. Defaults to 4.
- Returns:
The resulting pattern as a Batch object.
- Return type: