Skip to content

Introduce meta-edges to constrain and optimize tile matching logic in certain cases #29

@apirogov

Description

@apirogov

Example:

The Penrose P3 rhombi are not valid as pure rhombs, they need marked edges, which can be encoded by geometric constraints.

So for these tiles, both end up having step sequences of same length acting like a single "edge", and we know that matching anything else does not make sense (for the rhombi, a meta-edge of a polygon edge consists of 7 unit steps)

It would be much more efficient to be able to say: from vertex i to vertex j of the boundary, this is one "meta-edge", and say that such meta edges only are allowed to match as a whole. This on its own could be part of the pack structure logic.

To optimize further, we could attach metadata to it, specifically - if it is following its own matching "algebra", it should have

  • index of the key-lock (bump/dent) pair
  • sign (i.e. + = bump, - = dent)

In the meta edge logic:

  • narrow rhomb sequence is 1, 2, -2, -1
  • wide rhomb sequence is 1, -1, 2, -2

We can identify valid matches with indices of matching "key vertices" of bumps and respective dents of the corresponding tiles.

The key vertices of matching meta-edges for the narrow and wide rhomb (logial pair -> matched vertex pair along angle sequence we use):

  • N1(+) N1(-) = N3 N24
  • N1(+) W1(-) = N3 W11
  • N2(+) N2(-) = N11 N18
  • N2(+) W2(-) = N11 W24
  • W1(+) W1(-) = W3 W11
  • W1(+) N1(-) = W3 N24
  • W2(+) W2(-) = W18 W24
  • W2(+) N2(-) = W18 N18

The next question is whether one could simply do all "string based" operations on top of the more abstract annotated sequence, which would weed out a lot of invalid matches immediately.

If a fixed-length meta-edge system is used to represent longer uniform-length polygon edges (i.e. a generic system for edge markings), we could simply attach the angle information to the meta edge and work only with such "meta-units"!

A meta unit over a ring ZZi and a family of meta-edges of fixed length k (over a finite set of key-lock pairs) is simply the cartesian product of these sets and the only thing that changes are more refined matching and "complementation" rules (e.g. complementation must also turn keys into locks and vice versa)

To pull this off, it looks like we need to abstract from angle units to "unit-like" complex types, and abstract from snakes to something that works over different unit-like types.

Maybe worth thinking about how this interacts with #1 and find a clean abstraction that could allow both kind of generalizations nicely.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions