# Hokke ten Hokke

I’m currently reading the chapter “*Hokke ten Hokke*” from Dōgen Zenji’s “*Shōbōgenzō*”. The *Shōbōgenzō* is one of the most important texts in the Soto-Zen tradition of Buddhism. It was written in the 13th century by Dōgen, the founder of the Soto school in Japan. The chapter “*Hokke ten Hokke*” translates as “*The Flower of Dharma Turns the Flower of Dharma*” and Dōgen explains here the Buddhist view of the Universe and quotes many words from the Lotus Sutra. Being motivated by that chapter, I wanted to see, how mathematics would also incorporate into “*Hokke ten Hokke*”.

## Mathematical interpretation of “*Hokke ten Hokke*”

I wanted to visualize “*Hokke ten Hokke*” by drawing a lotus flower just based on mathematical expressions. I thought, it can be best represented by a rhodonea curveꜛ using polar coordinates. Polar coordinates are a two-dimensional coordinate system in which each point on a plane is determined by an angle and a distance from the reference point. This is ideal for representing flower-like patterns as they often exhibit radial symmetry.

In polar coordinates, we describe a location $(r, \theta)$ where $r$ is the radius — the distance from the origin — and $\theta$ is the angle from the positive $x$-axis. The polar equation for the lotus flower is given by:

\[r = \sin(8 \, \theta \, t)\]where $t$ is a time parameter which is used to animate the flower. As $\theta$ varies from $0$ to $2\pi$, covering a full circle, we generate a series of $r$ values. The factor of $8$ determines half the number of petals the flower will have. Thus, in our case we generate 16 petals. The $\sin$ function gives the flower its undulating, petal-like shape, as the function varies from -1 to 1 in a smooth, wave-like manner. To plot this in Cartesian coordinates (for the benefit of simplicity in visualization), we we simply transform:

\[\begin{align*} x &= r \cos(\theta) \\ y &= r \sin(\theta) \end{align*}\]## Animating the Lotos flower

To bring the Lotos flower to life, we just need the `numpy`

and `matplotlib`

library in Python. The latter has robust support for animations:

```
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.animation import FuncAnimation
```

We first create an empty figure, which we will populate with the flower pattern:

```
fig, ax = plt.subplots()
x, y = [], []
line, = plt.plot([], [], 'r')
```

Then, we define an `init()`

function that is used to set up the plot limits and returns the line and text objects which will be updated in the animation:

```
def init():
ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)
return line, text
```

Next, we define the `flower(t)`

function that calculates `x`

and `y`

for each `theta`

based on the `t`

value:

```
def flower(t):
theta = np.linspace(0, 2.*np.pi, 1000)
r = np.sin(8 * theta * t)
return r * np.cos(theta), r * np.sin(theta)
```

Finally, the `update()`

function animates the flower by updating the plot data and the text object for each frame:

```
def update(frame):
x, y = flower(frame/100)
line.set_data(x, y)
text.set_text(f'theta = 0 to 2π per point\nr = sin(8*theta*{frame/100})\nx = r*cos(theta)\ny = r*sin(theta)')
return line, text
```

The animation is saved as a GIF:

Here is the full code. It also available in this GitHub repositoryꜛ;

```
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.animation import FuncAnimation
fig, ax = plt.subplots(figsize=(8, 8))
x, y = [], []
line, = plt.plot([], [], c='deeppink')
text = plt.text(-0.99, 0.99, '', fontsize=12, color='slategrey')
plt.xlabel('X')
plt.ylabel('Y')
def init():
ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)
ax.set_axis_off()
return line, text
def flower(t):
theta = np.linspace(0, 2.*np.pi, 1000)
r = np.sin(8 * theta * t)
return r * np.cos(theta), r * np.sin(theta)
def update(frame):
x, y = flower(frame/100)
line.set_data(x, y)
# The theta value is changing continuously from 0 to 2π
text.set_text(f'theta = 0 to 2π\nr = sin(8*theta*{frame/100})\nx = r*cos(theta)\ny = r*sin(theta)')
return line, text
ani = FuncAnimation(fig, update, frames=range(101), init_func=init, blit=True)
ani.save('images/lotos_flower_2.gif', writer='imagemagick')
plt.close(fig)
```

## Conclusion

I don’t want to give any interpretation of the flower or the chapter. I think, it’s better to make up your own mind. Let me just share the following quote:

When the mind is blinded, the flower of the Dharma turns.

When the mind is awakened, you turn the flower of Dharma.

No matter how much you recite, if you are not clear,

The sutra becomes an enemy to you due of its content.

Without a vision, the mind is in the right state.

With a vision, the mind goes in the wrong direction.

If you go beyond both,

You will ride in the white ox cart without an end.

– Dōgen Zenji, “*Hokke ten Hokke*”, “*Shōbōgenzō*” (1305)

## Comments

Commenting on this post is currently disabled.

Comments on this website are based on a Mastodon-powered comment system. Learn more about it here.