<p>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.  </p>

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

<p><a href="https://i.sstatic.net/5J0CX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5J0CX.png" alt="enter image description here"></a></p>

<p>So after first steps we get such a structure and the filling will be:  </p>

<p><a href="https://i.sstatic.net/Xjcoj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Xjcoj.png" alt="enter image description here"></a></p>

<p>(Initial center is marked red)  </p>

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

<p>Then next step will give this:  </p>

<p><a href="https://i.sstatic.net/d75He.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/d75He.png" alt="enter image description here"></a></p>

<p>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.  </p>

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

CC BY-SA 3.0
2017-03-03T12:10:00.967Z
I think you can do this vith a L-system. Like the penrose tiling exaple on [this page](http://www.kevs3d.co.uk/dev/lsystems/), 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](https://bitbucket.org/joojaa/jooillustratorscripts/src/99aaf05584e32a9c694bbdb0857169201ff9af26/jooLSystem.jsx?at=Lsys&fileviewer=file-view-default)
joojaa
CC BY-SA 3.0
2017-03-07T01:46:23.227Z
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.
minimax
CC BY-SA 3.0
2017-03-02T23:21:24.430Z
2017-03-02T23:21:24.430Z
Mikhail V
<p>If you're trying to tile the plane with regular pentagons with no spacing, <a href="https://en.wikipedia.org/wiki/Pentagonal_tiling" rel="nofollow noreferrer">that's not possible.</a></p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>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 <a href="https://en.wikipedia.org/wiki/Pentagonal_tiling#Pentagonal.2Fhexagonal_tessellation" rel="nofollow noreferrer">pentagonal/hexagonal tiling</a> of the plane.</p>

<p>If I've misunderstood what you're trying to do, please clarify.</p>

CC BY-SA 3.0
2017-02-09T00:44:03.217Z
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.
minimax
CC BY-SA 3.0
2017-02-09T00:56:56.663Z
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: http://www.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.
minimax
CC BY-SA 3.0
2017-02-09T05:13:34.417Z
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!).
user1118321
CC BY-SA 3.0
2017-02-08T04:53:45.517Z
2017-02-08T04:53:45.517Z
user1118321
<p>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. </p>

<p><a href="https://i.sstatic.net/TLnKi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TLnKi.png" alt="pentagon-rhombus lattice"></a></p>

<p>Below is the python script:</p>

<pre><code>#!/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()
</code></pre>

<p>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.</p>

<p><a href="https://i.sstatic.net/djejd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/djejd.png" alt="enter image description here"></a></p>

<p>Here's a python script with a recursive algorithm (though not optimized):</p>

<pre><code>#!/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()
</code></pre>

CC BY-SA 3.0
2017-03-07T01:33:20.277Z
2017-03-21T12:13:46.197Z
2017-03-21T12:13:46.197Z
minimax
<p>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.</p>

<p><a href="https://i.sstatic.net/WIGNE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WIGNE.png" alt="first recursion"></a></p>

<p><a href="https://i.sstatic.net/1uVtg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1uVtg.png" alt="second recursion"></a></p>

<p><a href="https://i.sstatic.net/QQscK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QQscK.png" alt="third recursion"></a></p>

<p>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:</p>

<pre><code># 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()
</code></pre>

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

CC BY-SA 3.0
2017-02-08T09:34:48.043Z
which ones are missing? It looks correct at first glance.
ratchet freak
CC BY-SA 3.0
2017-02-08T13:20:14.277Z
[I put a hand-drawn circle into each pentagon (blue from first iteration and black for second iteration](https://i.sstatic.net/96y1X.png) I counted 25 black circles and 5 blue ones.
ratchet freak
CC BY-SA 3.0
2017-02-09T00:24:01.297Z
The ones in the middle of each large side. The tips from these pentagons would stick out of the big pentagon. If I add one more recurrence one sees the "cracks" opening up.
minimax
<computational-geometry>
Fill the plane with pentagons as tightly as possible in a regular way
minimax
# Fill the plane with pentagons as tightly as possible in a regular way

(Asked by: username_0 on 2017-02-08)

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](https://i.sstatic.net/WIGNE.png)](https://i.sstatic.net/WIGNE.png)

[![second recursion](https://i.sstatic.net/1uVtg.png)](https://i.sstatic.net/1uVtg.png)

[![third recursion](https://i.sstatic.net/QQscK.png)](https://i.sstatic.net/QQscK.png)

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)?

**Tags:** computational-geometry

> **Comments:**
> **username_1**: which ones are missing? It looks correct at first glance.  
> **username_1**: [I put a hand-drawn circle into each pentagon (blue from first iteration and black for second iteration](https://i.sstatic.net/96y1X.png) I counted 25 black circles and 5 blue ones.  
> **username_0**: The ones in the middle of each large side. The tips from these pentagons would stick out of the big pentagon. If I add one more recurrence one sees the "cracks" opening up.  

---

## 3 answers

### Answer by username_2 on 2017-03-02. Score: 3

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](https://i.sstatic.net/5J0CX.png)](https://i.sstatic.net/5J0CX.png)

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

[![enter image description here](https://i.sstatic.net/Xjcoj.png)](https://i.sstatic.net/Xjcoj.png)

(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](https://i.sstatic.net/d75He.png)](https://i.sstatic.net/d75He.png)

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.

> **Comments:**
> **username_3**: I think you can do this vith a L-system. Like the penrose tiling exaple on [this page](http://www.kevs3d.co.uk/dev/lsystems/), 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](https://bitbucket.org/username_3/jooillustratorscripts/src/99aaf05584e32a9c694bbdb0857169201ff9af26/jooLSystem.jsx?at=Lsys&fileviewer=file-view-default)  
> **username_0**: Based on the answer by @username_2 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.  

---

### Answer by username_4 on 2017-02-08. Score: 1

If you're trying to tile the plane with regular pentagons with no spacing, [that's not possible.](https://en.wikipedia.org/wiki/Pentagonal_tiling)

> 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](https://en.wikipedia.org/wiki/Pentagonal_tiling#Pentagonal.2Fhexagonal_tessellation) of the plane.

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

> **Comments:**
> **username_0**: 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.  
> **username_0**: 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: http://www.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.  
> **username_4**: 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!).  

---

### Answer by username_0 on 2017-03-07. Score: 1

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](https://i.sstatic.net/TLnKi.png)](https://i.sstatic.net/TLnKi.png)

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](https://i.sstatic.net/djejd.png)](https://i.sstatic.net/djejd.png)

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()

```


---

