Aperiodic monotile

[1]:
import lostinmsh as lsm
import matplotlib.pyplot as plt
import numpy as np

%matplotlib inline
plt.rcParams.update({"font.size": 15})

Define the polygon

[2]:
vertices = [
    [0, 0],
    [0, np.sqrt(3)],
    [1, np.sqrt(3)],
    [3 / 2, 3 * np.sqrt(3) / 2],
    [3, np.sqrt(3)],
    [3, 0],
    [4, 0],
    [9 / 2, -np.sqrt(3) / 2],
    [3, -np.sqrt(3)],
    [3 / 2, -np.sqrt(3) / 2],
    [1, -np.sqrt(3)],
    [-1, -np.sqrt(3)],
    [-3 / 2, -np.sqrt(3) / 2],
]
polygon = lsm.Polygon.from_vertices(vertices, "Cavity")

fig, ax = plt.subplots(figsize=[5, 5], layout="constrained")
lsm.plot_polygon(polygon, ax=ax)

Define the geometry

[3]:
geometry = lsm.Geometry.from_polygon(polygon, lsm.AutoCircular(border_factor=0.25))

fig, ax = plt.subplots(figsize=[5, 5], layout="constrained")
lsm.plot_geometry(geometry, ax=ax)

Mesh the geometry

[4]:
lsm.mesh_unstructured(geometry, 0.2, lsm.GmshOptions(gui=True))
Info    : Increasing process stack size (8192 kB < 16 MB)

Locally structured mesh the geometry

[5]:
lsm.mesh_loc_struct(geometry, 0.2, lsm.GmshOptions(gui=True))