Skip to content

Dual graph (How to center a vertex instead of a tile) #11

Answered by cduck
Dib-Roy asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. The tilings are generated by placing the center polygon then placing the rest adjacent to earlier tiles. You can translate the first polygon off-center to get what you want.

It is easy to do this if you already use layout.defaultStartTile to generate the first tile. See the example below (adapted from tiles.ipynb).

p1 = 4
p2 = 3
q = 3

theta1, theta2 = math.pi*2/p1, math.pi*2/p2
phiSum = math.pi*2/q
r1 = triangleSideForAngles(theta1/2, phiSum/2, theta2/2)
r2 = triangleSideForAngles(theta2/2, phiSum/2, theta1/2)

tGen1 = htiles.TileGen.makeRegular(p1, hr=r1, skip=1)
tGen2 = htiles.TileGen.makeRegular(p2, hr=r2, skip=1)

tLayout = htiles.TileLayout()
tLayout.addGenerator(tGen1, (1,)*p1)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Dib-Roy
Comment options

@cduck
Comment options

cduck Sep 3, 2021
Maintainer

Answer selected by cduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants