Back to topic, this thread is made because of a great gallery, Dirk Frettlöh's Tilings Encyclopedia. Not having any mathematical knowledge on this field, I tried to invent my own substitution rules and see how delicate the resulting tilings are.
Previously I constructed my patterns with (don't ask) ChemDraw by manually putting together polygons one by one, and of course it's a time-consuming process prone to random errors. Once I asked, and got a reply:
However, the coding work for my own substitutions hasn't become possible until my recent decision to take a Python course and actually look into programming.dvgrn wrote: ↑September 11th, 2019, 8:16 amInteresting question. ...GUYTU6J wrote:I download the software Ready under gollygang umbrella, and found it is capable of generating finite Penrose tiling by subdivision. Can I modify anything so that it can be applied to custom subdivision rules and effectively leading to other aperiodic 2d tilings?
[details about how Ready works omitted]
The coding for this kind of thing isn't as painful as it might seem, though. For example, see illustrations in p29-30 of Volume 1 of the G4G13 Gift Exchange book, for some recursive subdivisions of Robert Ammann's golden-bee / chair tiling. I have the Python code for generating those meshes, if you're interested. Here's a sample -- runs in Golly, for no particularly good reason; only fifty-some lines of code, including the SVG generation:
You'll probably have to doCode: Select all
import golly as g import math import svgwrite from svgwrite import cm, mm def goldpt(coord1, coord2): x1, y1 = coord1; x2, y2 = coord2 x3, y3 = x1+golden*(x2-x1), y1+golden*(y2-y1) return (x3, y3) level = 12 dwg = svgwrite.Drawing(filename='c:/your/path/here/goldenbee.svg', debug=True) scale = 500.0 margin = scale/10 golden = math.sqrt(5)/2.0-0.5 top = 0 left = 0 bottom=scale right = math.sqrt(golden)*scale ledge = bottom - golden*(bottom-top) vert = left+golden*(right-left) coord1 = (left,top) coord2 = (left,bottom) coord3 = (right,bottom) coord4 = (right, ledge) coord5 = (vert, ledge) coord6 = (vert, top) dwg.viewbox(left-margin, top-margin, right+margin, bottom+margin) dwg.add(dwg.g(id='demo')) tilelist = [([coord1, coord2, coord3, coord4, coord5, coord6], 1, 0)] while level>0: level -= 1 newtilelist=[] for tile in tilelist: coord1, coord2, coord3, coord4, coord5, coord6 = tile[0] coord7 = goldpt(coord3, coord1) coord9 = goldpt(coord1, coord2) coordZ = goldpt(coord3, coord4) coord8 = goldpt(coordZ, coord9) othercolor = tile[2]+1 -(3 if tile[2]==2 else 0) newtilelist.append(([coord2, coord3, coord4, coord7, coord8, coord9],tile[1]+1, tile[2])) newtilelist.append(([coord9, coord1, coord6, coord5, coord7, coord8], tile[1]+2, othercolor)) tilelist=newtilelist[:] for tile in tilelist[::-1]: if tile[2]==0: s="rgb(90%,90%,100%)" elif tile[2]==1: s="rgb(70%,90%,50%)" else: s="rgb(100%,80%,90%)" tiles = dwg.add(dwg.g(stroke='green', fill=s, stroke_width=10.0/tile[1])) tiles.add(dwg.polygon(tile[0])) dwg.save() g.show("Wrote output to goldenbee.svg.")
before the script will run.Code: Select all
pip install svgwrite
...