4
$\begingroup$

I wrote a small python script with recursion to create a "lattice" of non-overlapping pentagons. Below one can see the first stages of recursion.

first recursion

second recursion

third recursion

One can see that 5 small pentagons are missing in the second stage of recursion. The code in python to generate these figures is this:

# fill the plane with pentagons as tightly as possible in a regular way
#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
N = 5
phi = (1.0+np.sqrt(5.0))/2
def pentagon (X, Y, n):
    if n == 0:
        rx = np.append(X, X[0])
        ry = np.append(Y, Y[0])
        plt.plot(rx, ry, 'r-')
        return
    for i in range(N):
        Xn = np.array([X[i], X[i], X[i], X[i], X[i]])
        Yn = np.array([Y[i], Y[i], Y[i], Y[i], Y[i]])
    U = Xn/phi+X*(1-1.0/phi)
    V = Yn/phi+Y*(1-1.0/phi)
    pentagon (U, V, n-1)
Xn = X/phi +np.roll(X, 2)*(1-1.0/phi)
Yn = Y/phi +np.roll(Y, 2)*(1-1.0/phi)
# center pentagon
pentagon (Xn, Yn, n-1)
Ind = np.arange(N)
theta =np.pi/10
X = np.cos(Ind*2*np.pi/N+theta)
Y = np.sin(Ind*2*np.pi/N+theta)
plt.figure()
plt.axes().set_aspect('equal')
n_iter = 2 # number of iterations
pentagon (X, Y, n_iter)
figure = "pentagons%d.png" % n_iter
plt.axis('off')
plt.savefig(figure)
plt.show()

Any suggestions on how to fill in the missing pentagons in a simple way (e.g. keeping the recursive nature of the algorithm)?

$\endgroup$
3

3 Answers 3

3
$\begingroup$

If I understand the general idea correctly, you are going to close the gaps which are appearing after further structure growth. I cannot do it algorithmically but geometrically it is quite easy to do. I use Illustrator here and manually cover the gaps with two additional shapes.

So in addition to the pentagon and flat rhombus, I will need a 5-fold star and another rhombus:

enter image description here

So after first steps we get such a structure and the filling will be:

enter image description here

(Initial center is marked red)

I don't fill all holes and I leave out the obvious ones just to make arrangements more visible.

Then next step will give this:

enter image description here

Here I do only halves of crack fillings, those are symmetrical. As seen those cracks indeed can be covered using same shapes without gaps and have self-similar patterns. How this can be achieved algorithmically, I don't know unfortunatelly. But this is interesting question, probably there are solutions somewhere, IDK.

Theoretically if one analyse several crack fillings for each step, one can guess a relatively simple algorithm.

$\endgroup$
2
  • 1
    $\begingroup$ I think you can do this vith a L-system. Like the penrose tiling exaple on this page, see examples on the right. (a L-system is pretty easy to program, if you dont know how its one of those cassic CS things). An early alpha version of a L-System generator for illustrator can be found here $\endgroup$
    – joojaa
    Commented Mar 3, 2017 at 12:10
  • $\begingroup$ Based on the answer by @Mikhail V and by looking at the fractal structure given in my code with number of iterations up to 5, I wonder if one could make a "fractal complement" (or dual) to fill in the gaps/cracks, since they are also self-similar. Then one could patch both fractals together in the end. $\endgroup$
    – minimax
    Commented Mar 7, 2017 at 1:46
1
$\begingroup$

If you're trying to tile the plane with regular pentagons with no spacing, that's not possible.

A regular pentagonal tiling on the Euclidean plane is impossible because the internal angle of a regular pentagon, 108°, is not a divisor of 360°, the angle measure of a whole turn.

From the same link, though, there are several non-regular pentagons you can use to tile it as shown in the above link. Additionally, you can do a pentagonal/hexagonal tiling of the plane.

If I've misunderstood what you're trying to do, please clarify.

$\endgroup$
3
  • $\begingroup$ I know it's not possible to tile the plane only with pentagons. I'm trying to use pentagons and rhombuses (for the gaps), which is possible in another configuration, but not in the above one. If you use the code I provided with n_iter=3, the figure generated will have big cracks of white space in it. I'm trying to avoid that. $\endgroup$
    – minimax
    Commented Feb 9, 2017 at 0:44
  • $\begingroup$ One strategy for growing the pentagon "lattice" above, would be to add another pentagon to each side of the small pentagons whenever possible, without overlapping one another. It would be like a crystal growth. One gets a quasicrystal like in this link: pnas.org/content/93/25/14271/F4.large.jpg, in this case one needs 3 basic shapes. I think though the recursive method won't work. $\endgroup$
    – minimax
    Commented Feb 9, 2017 at 0:56
  • $\begingroup$ Ah, sorry, I misunderstood what you were trying to do. I'll see if I can come up with something that addresses your actual question (no promises!). $\endgroup$ Commented Feb 9, 2017 at 5:13
1
$\begingroup$

Although this is not the solution I was looking for initially, the figure below is the tightest filling without overlaps of the plane with pentagons that I could come up with so far. I haven't found a recursive algorithm yet. I think it's not possible or it is too complicated to code.

pentagon-rhombus lattice

Below is the python script:

#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
N = 5
def pentagon (Xorig, Yorig, theta):
    Ind = np.arange(N+1)
    X = np.cos(Ind*2*np.pi/N+theta)+Xorig
    Y = np.sin(Ind*2*np.pi/N+theta)+Yorig
    plt.fill(X, Y, 'r-')

plt.axes().set_aspect ('equal')
r = 2*np.cos(np.pi/5)
plt.xlim(-2, 30)
plt.ylim(-2, 30)
Lx = np.cos(np.pi/10)
for j in np.arange(0, 10):
    Xorig = (j%2)*Lx*np.ones(N+1)
    Yorig = j*(1+2*np.cos(np.pi/5)+np.cos(2*np.pi/5))*np.ones(N+1)
    theta = np.pi/(2*N)
    sign = 1
    for i in np.arange(1, 32):
        pentagon(Xorig, Yorig, theta)
        Xorig += r*np.cos(3*theta)*np.ones(N+1)
        Yorig += r*np.sin(3*theta)*np.ones(N+1)
        sign *= -1
        theta = sign*np.pi/(2*N)
plt.axis('off')
plt.savefig("pentagonLattice.png", bbox_inches='tight')
plt.show()

Also I haven't found yet a simple way to make a quasi-periodic tiling of the plane with only pentagons and rhombi yet. I did find out though how to fill the plane with pentagons and rhombi with a center with 5-fold symmetry.

enter image description here

Here's a python script with a recursive algorithm (though not optimized):

#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
N = 5
# The golden ratio
phi = (1.0+np.sqrt(5.0))/2
# angle increment
theta0 = np.pi/5
LEFT = 0
RIGHT = 1
# fill plot a pentagon with center at (Xorig, Yorig) and orientation theta
def pentagon (Xorig, Yorig, theta):
    Ind = np.arange(N+1)
    X = np.cos(Ind*2*np.pi/N+theta)+Xorig
    Y = np.sin(Ind*2*np.pi/N+theta)+Yorig
    plt.fill(X, Y, 'r-')
# At each step three edges are generated
# and two recursive calls are made
def stepSplit (previousPoint, previousTurn, theta, nIter):
    if nIter == 0:
        return
    if previousTurn == RIGHT:
        # Turn left 
        theta = theta+theta0
    elif previousTurn == LEFT:
        # turn right 
        theta = theta-theta0
    nextPoint = previousPoint + phi*np.array([np.cos(theta), np.sin(theta)])
    X, Y = zip(previousPoint, nextPoint)
    pentagon (nextPoint[0], nextPoint[1], theta)
    # Update
    previousPoint[:] = nextPoint[:]
    # Bifurcation
    # Turn left 
    theta1 = theta+theta0

    nextPoint = previousPoint + phi*np.array([np.cos(theta1), np.sin(theta1)])
    X, Y = zip(previousPoint, nextPoint)
    pentagon (nextPoint[0], nextPoint[1], theta1)
    stepSplit(nextPoint, LEFT, theta1, nIter-1)

    # Turn right 
    theta1 = theta-theta0
    nextPoint = previousPoint + phi*np.array([np.cos(theta1), np.sin(theta1)])
    X, Y = zip(previousPoint, nextPoint)
    pentagon (nextPoint[0], nextPoint[1], theta1)
    stepSplit(nextPoint, RIGHT, theta1, nIter-1)

# fill plot pentagons
# Central pentagon
pentagon (0.0, 0.0, 0.0)
for i in [1, 3, 5, 7, 9]:
    stepSplit (np.array([0.0, 0.0]), -1, i*theta0, 5)

for i in [0, 2, 4, 6, 8]:
    theta = i*np.pi/5
    x0 = phi*(1.0+2*np.cos(np.pi/5))*np.cos(theta)
    y0 = phi*(1.0+2*np.cos(np.pi/5))*np.sin(theta)
    pentagon (x0, y0, theta0)
    stepSplit (np.array([x0, y0]), -1, theta, 4)

plt.axes().set_aspect ('equal')
plt.axis('off')
plt.savefig("pentagonLattice4.png", bbox_inches='tight')
plt.show()
$\endgroup$
1
  • 1
    $\begingroup$ The densest known packing of the regular pentagon is slightly different. $\endgroup$
    – user106
    Commented Mar 25, 2017 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.