Cut and Project Scheme

Cut and project schemes and model sets

class slabbe.cut_and_project_scheme.CutAndProjectScheme(base_ring, pi, pi_int, lattice, check=True)

Bases: SageObject

INPUT:

  • base_ring – ring

  • pi\(n\times d\) matrix, projection of the ambiant space to

    the physical space

  • pi_int\(n\times (n-d)\) matrix, projection of the ambiant space

    to the internal space

  • lattice\(n\times n\) matrix, the columns form a base of a

    lattice in R^n

  • check – boolean (default:True), whether to check that

    dimensions of the matrices given as input are consistent

EXAMPLES:

sage: from slabbe import CutAndProjectScheme
sage: z = polygen(QQ, 'z')
sage: K = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: phi = K.gen()
sage: pi = matrix([[phi, 1]])
sage: pi_int = matrix([[-~phi, 1]])
sage: lattice = identity_matrix(2)
sage: cap = CutAndProjectScheme(K, pi, pi_int, lattice)
ambiant_space()

Return the ambiant space

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.ambiant_space()
Vector space of dimension 2 over Number Field in phi with
defining polynomial z^2 - z - 1 with phi = 1.618033988749895?
ambiant_space_dimension()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.ambiant_space_dimension()
2
base_ring()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.base_ring()
Number Field in phi with defining polynomial z^2 - z - 1 with phi = 1.618033988749895?
internal_space()

Return the internal space

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.internal_space()
Vector space of dimension 1 over Number Field in phi with
defining polynomial z^2 - z - 1 with phi = 1.618033988749895?
internal_space_dimension()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.internal_space_dimension()
1
internal_space_projection()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.internal_space_projection()
[-phi + 1        1]
lattice()

Return the lattice

OUTPUT:

a matrix whose columns generate the lattice

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.lattice()
[1 0]
[0 1]
lattice_base()

Return the lattice base

OUTPUT:

a matrix whose columns generate the lattice

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.lattice_base()
[(1, 0), (0, 1)]
lattice_neighbors(v)

Return the neighbors of a point according to the base of the lattice

INPUT:

  • v – tuple or vector, in the ambiant space

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: v = vector((10, 10))
sage: cap.lattice_neighbors(v)
[(11, 10), (10, 11), (9, 10), (10, 9)]
physical_space()

Return the physical space

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.physical_space()
Vector space of dimension 1 over Number Field in phi with
defining polynomial z^2 - z - 1 with phi = 1.618033988749895?
physical_space_dimension()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.physical_space_dimension()
1
physical_space_projection()

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cap = cut_and_project_schemes.Fibonacci()
sage: cap.physical_space_projection()
[      1 phi - 1]
star_map()
class slabbe.cut_and_project_scheme.CutAndProjectSchemeGenerator

Bases: object

Constructor of several famous cut and project schemes

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cut_and_project_schemes.Fibonacci()
2-to-1 cut and project scheme
Fibonacci()

Return the Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cut_and_project_schemes.Fibonacci()
2-to-1 cut and project scheme
Fibonacci2D()

Return the 2D Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cut_and_project_schemes.Fibonacci2D()
4-to-2 cut and project scheme
Fibonacci_the_Minkowski_way()

Return the Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cut_and_project_schemes.Fibonacci_the_Minkowski_way()
2-to-1 cut and project scheme
sage: print(cut_and_project_schemes.Fibonacci_the_Minkowski_way())
2-to-1 cut and project scheme over
Number Field in phi with defining polynomial z^2 - z - 1 with
phi = 1.618033988749895?
Projection to physical space:
[1 0]
Projection to internal space:
[0 1]
Lattice generated by the columns of:
[       1      phi]
[       1 -phi + 1]
Penrose()

Return the Penrose cut and project scheme

EXAMPLES:

sage: from slabbe import cut_and_project_schemes
sage: cut_and_project_schemes.Penrose()
5-to-2 cut and project scheme
class slabbe.cut_and_project_scheme.ModelSet(cut_and_project_scheme, window)

Bases: SageObject

Regular Euclidean model set

INPUT:

  • cut_and_project_schemes – a cut and project scheme

  • window – polyhedron

EXAMPLES:

sage: from slabbe import cut_and_project_schemes, ModelSet
sage: cap = cut_and_project_schemes.Fibonacci()
sage: phi = cap.base_ring().gen()
sage: W = Polyhedron([(-1,),(phi-1,)])
sage: m = ModelSet(cap, W)
ambiant_compact_strip(physical_window)

Return the preimage of the window in the internal space by the projection in the internal space.

INPUT:

  • physical_window – polyhedron

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: m.ambiant_compact_strip(W)
A 2-dimensional polyhedron in (Number Field in phi with
defining polynomial z^2 - z - 1 with phi =
1.618033988749895?)^2 defined as the convex hull of 4 vertices

Penrose tiling:

sage: m = model_sets.Penrose()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: m.ambiant_compact_strip(W)
A 5-dimensional polyhedron in (Number Field in a with
defining polynomial z^4 - 5*z^2 + 5 with a =
1.175570504584947?)^5 defined as the convex hull of 88
vertices

We move the window to force a resolution of the Conway worms:

sage: shift = vector((1,-1,2,-1,-1)) / 1000
sage: m = model_sets.Penrose(shift)
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: m.ambiant_compact_strip(W)
A 5-dimensional polyhedron in (Number Field in a with defining
polynomial z^4 - 5*z^2 + 5 with a = 1.175570504584947?)^5
defined as the convex hull of 88 vertices
cut(physical_window)

Return the lattice points that are projected in the internal space window (and that are projected to the provided physical space window).

INPUT:

  • physical_window – polyhedron

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: m.cut(W)
[(3, 2), (4, 2), (3, 1), (4, 3), (2, 1), (5, 3), (1, 1), (6,
3), (1, 0), (6, 4), (0, 0), (7, 4)]
cut_and_project(physical_window)

Return the model set restricted to a window in the physical space

INPUT:

  • physical_window – polyhedron

OUTPUT:

list

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: sorted(m.cut_and_project(W))
[(0),
 (1),
 (phi),
 (phi + 1),
 (phi + 2),
 (2*phi + 1),
 (2*phi + 2),
 (3*phi + 1),
 (3*phi + 2),
 (3*phi + 3),
 (4*phi + 2),
 (4*phi + 3)]
cut_and_project_scheme()
cut_edges(physical_window)

Return the edges linking lattice points that are projected in the internal space window (and that are projected to the provided physical space window).

INPUT:

  • physical_window – polyhedron

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: sorted(sorted(edge) for edge in m.cut_edges(W))
[[(0, 0), (1, 0)],
 [(1, 0), (1, 1)],
 [(1, 1), (2, 1)],
 [(2, 1), (3, 1)],
 [(3, 1), (3, 2)],
 [(3, 2), (4, 2)],
 [(4, 2), (4, 3)],
 [(4, 3), (5, 3)],
 [(5, 3), (6, 3)],
 [(6, 3), (6, 4)],
 [(6, 4), (7, 4)]]
internal_space_window_preimage()

Return the preimage of the window in the internal space by the projection in the internal space.

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: m.internal_space_window_preimage()
A 2-dimensional polyhedron in (Number Field in phi with defining polynomial z^2 - z - 1
with phi = 1.618033988749895?)^2 defined as the convex hull of 2 vertices and 1 line

Penrose tiling:

sage: m = model_sets.Penrose()
sage: strip = m.internal_space_window_preimage()
sage: strip
A 5-dimensional polyhedron in (Number Field in a with defining
polynomial z^4 - 5*z^2 + 5 with a = 1.175570504584947?)^5
defined as the convex hull of 22 vertices and 2 lines
sage: vector((0,0,0,0,0)) in strip
True

We move the window to force a resolution of the Conway worms:

sage: shift = vector((1,-1,2,-1,-1)) / 1000
sage: m = model_sets.Penrose(shift)
sage: strip = m.internal_space_window_preimage()
sage: vector((0,0,0,0,0)) in strip
False
sage: vector((1,1,1,1,1)) in strip
False
is_Meyer()
is_generic()
is_regular()
is_relatively_dense()
is_singular()
is_uniformly_discrete()
lattice_neighbors_projected_in_window(v)

Return the neighbors of a point that are projected in the (internal space) window

INPUT:

  • v – tuple or vector, in the ambiant space

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: v = vector((0,0))
sage: m.lattice_neighbors_projected_in_window(v)
[(1, 0), (-1, 0), (0, -1)]
physical_space_window_preimage(physical_window)

Return the preimage of the window in the internal space by the projection in the internal space.

INPUT:

  • physical_window – polyhedron

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: m.physical_space_window_preimage(W)
A 2-dimensional polyhedron in (Number Field in phi with defining polynomial z^2 - z - 1
with phi = 1.618033988749895?)^2 defined as the convex hull of 2 vertices and 1 line

Penrose tiling:

sage: m = model_sets.Penrose()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: strip = m.physical_space_window_preimage(W)
sage: strip
A 5-dimensional polyhedron in (Number Field in a with defining
polynomial z^4 - 5*z^2 + 5 with a = 1.175570504584947?)^5
defined as the convex hull of 4 vertices and 3 lines

We move the window to force a resolution of the Conway worms:

sage: shift = vector((1,-1,2,-1,-1)) / 1000
sage: m = model_sets.Penrose(shift)
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: strip = m.physical_space_window_preimage(W)
sage: strip
A 5-dimensional polyhedron in (Number Field in a with defining
polynomial z^4 - 5*z^2 + 5 with a = 1.175570504584947?)^5
defined as the convex hull of 4 vertices and 3 lines
plot_in_ambiant_space(physical_window, pointsize=100)

Return a Graphics representing the model set restricted to a window in the physical space (seen in the ambiant space)

INPUT:

  • physical_window – polyhedron

  • pointsize – integer (default:20)

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(-10,),(10,)])
sage: G = m.plot_in_ambiant_space(W)
sage: G.show(aspect_ratio=1, figsize=20)

TODO: The following needs a little fix since the slope is zero (some limit case for the region_plot):

sage: m = model_sets.Fibonacci_the_Minkowski_way()
sage: W = Polyhedron([(-10,),(10,)])
sage: G = m.plot_in_ambiant_space(W)
sage: G.show(aspect_ratio=1, figsize=20)    # known bug

TESTS:

sage: m = model_sets.Fibonacci2D()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: G = m.plot_in_ambiant_space(W)
Traceback (most recent call last):
...
NotImplementedError: when physical space dimension is 2 and
ambiant space dimension is 4
plot_in_physical_space(physical_window, pointsize=100)

Return a Graphics representing the model set restricted to a window in the physical space

INPUT:

  • physical_window – polyhedron

  • pointsize – integer (default:20)

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci2D()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: G = m.plot_in_physical_space(W)
sage: G.show(aspect_ratio=1, figsize=20)

Penrose tiling:

sage: m = model_sets.Penrose()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: G = m.plot_in_physical_space(W)
sage: G.show(aspect_ratio=1, figsize=20)

We move the window to force a resolution of the Conway worms:

sage: shift = vector((1,-1,2,-1,-1)) / 1000
sage: m = model_sets.Penrose(shift)
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: G = m.plot_in_physical_space(W)
sage: G.show(aspect_ratio=1, figsize=20)

TESTS:

sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(-10,),(10,)])
sage: G = m.plot_in_physical_space(W)
Traceback (most recent call last):
...
NotImplementedError: when physical space dimension is 1
some_element_of_lattice_in_the_strip(physical_window)

Return the lattice points that are projected in the internal space window (and that are projected to the provided physical space window).

INPUT:

  • physical_window – polyhedron

OUTPUT:

vector

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: m.some_element_of_lattice_in_the_strip(W)
(3, 2)

Penrose tiling:

sage: m = model_sets.Penrose()
sage: W = polytopes.hypercube(2, intervals=[(-10,10), (-10,10)])
sage: m.some_element_of_lattice_in_the_strip(W)
(0, 0, 0, 0, 0)
successor_map(physical_window)

Return the successor map of points in the lattice projected in both windows.

INPUT:

  • physical_window – polyhedron

EXAMPLES:

sage: from slabbe import model_sets
sage: m = model_sets.Fibonacci()
sage: W = Polyhedron([(0,),(10,)])
sage: succ = m.successor_map(W)
sage: succ(vector((0,0)))
[(1, 0)]
window()
class slabbe.cut_and_project_scheme.ModelSetGenerator

Bases: object

Constructor of several famous model sets

EXAMPLES:

sage: from slabbe import model_sets
sage: model_sets.Fibonacci()
Model Set of a 2-to-1 cut and project scheme
Fibonacci()

Return the Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import model_sets
sage: model_sets.Fibonacci()
Model Set of a 2-to-1 cut and project scheme
Fibonacci2D()

Return the 2D Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import model_sets
sage: model_sets.Fibonacci2D()
Model Set of a 4-to-2 cut and project scheme
Fibonacci_the_Minkowski_way()

Return the Fibonacci cut and project scheme

EXAMPLES:

sage: from slabbe import model_sets
sage: model_sets.Fibonacci_the_Minkowski_way()
Model Set of a 2-to-1 cut and project scheme
Penrose(shift=None)

Return the Penrose cut and project scheme

INPUT:

  • shift – 5-dimensional vector translating the internal window to avoid singular tilings and Conway worms

EXAMPLES:

sage: from slabbe import model_sets
sage: model_sets.Penrose()
Model Set of a 5-to-2 cut and project scheme
sage: shift = vector((1,-1,2,-1,-1)) / 1000
sage: model_sets.Penrose(shift)
Model Set of a 5-to-2 cut and project scheme